From 4fa63dd79b850148e497a0aacd5303a1e8d30d80 Mon Sep 17 00:00:00 2001 From: frankgoldfish Date: Tue, 17 Mar 2026 11:31:16 -0700 Subject: [PATCH] docs: fix incorrect example outputs in addition_subtraction.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hours and minutes example outputs in the addition/subtraction documentation contained three incorrect values: - add(hours=1) after add(hours=24): '2012-02-25' → '2012-01-29' - subtract(hours=1): '2012-02-29' → '2012-01-29' (also Feb 29 doesn't exist in 2012, it's a leap year but still wrong context) - subtract(minutes=24) after starting at 01:01: '00:00:00' → '00:37:00' Fixes #925 --- docs/docs/addition_subtraction.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/addition_subtraction.md b/docs/docs/addition_subtraction.md index 686f67f0..7f6c34ab 100644 --- a/docs/docs/addition_subtraction.md +++ b/docs/docs/addition_subtraction.md @@ -51,9 +51,9 @@ Each method returns a new `DateTime` instance. >>> dt = dt.add(hours=24) '2012-01-29 00:00:00' >>> dt = dt.add(hours=1) -'2012-02-25 01:00:00' +'2012-01-29 01:00:00' >>> dt = dt.subtract(hours=1) -'2012-02-29 00:00:00' +'2012-01-29 00:00:00' >>> dt = dt.subtract(hours=24) '2012-01-28 00:00:00' @@ -64,7 +64,7 @@ Each method returns a new `DateTime` instance. >>> dt = dt.subtract(minutes=1) '2012-01-28 01:01:00' >>> dt = dt.subtract(minutes=24) -'2012-01-28 00:00:00' +'2012-01-28 00:37:00' >>> dt = dt.add(seconds=61) '2012-01-28 00:01:01'