Skip to content

Commit 4fa63dd

Browse files
committed
docs: fix incorrect example outputs in addition_subtraction.md
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
1 parent ae4c405 commit 4fa63dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/docs/addition_subtraction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Each method returns a new `DateTime` instance.
5151
>>> dt = dt.add(hours=24)
5252
'2012-01-29 00:00:00'
5353
>>> dt = dt.add(hours=1)
54-
'2012-02-25 01:00:00'
54+
'2012-01-29 01:00:00'
5555
>>> dt = dt.subtract(hours=1)
56-
'2012-02-29 00:00:00'
56+
'2012-01-29 00:00:00'
5757
>>> dt = dt.subtract(hours=24)
5858
'2012-01-28 00:00:00'
5959

@@ -64,7 +64,7 @@ Each method returns a new `DateTime` instance.
6464
>>> dt = dt.subtract(minutes=1)
6565
'2012-01-28 01:01:00'
6666
>>> dt = dt.subtract(minutes=24)
67-
'2012-01-28 00:00:00'
67+
'2012-01-28 00:37:00'
6868

6969
>>> dt = dt.add(seconds=61)
7070
'2012-01-28 00:01:01'

0 commit comments

Comments
 (0)