mirror of
https://github.com/django/django.git
synced 2024-12-25 02:26:12 +00:00
fixed a typo in timezones docs.
This commit is contained in:
parent
76d5daa60f
commit
fe443b11de
@ -509,7 +509,7 @@ Setup
|
|||||||
Finally, our calendar system contains interesting traps for computers::
|
Finally, our calendar system contains interesting traps for computers::
|
||||||
|
|
||||||
>>> import datetime
|
>>> import datetime
|
||||||
>>> def substract_one_year(value): # DON'T DO THAT!
|
>>> def one_year_before(value): # DON'T DO THAT!
|
||||||
... return value.replace(year=value.year - 1)
|
... return value.replace(year=value.year - 1)
|
||||||
>>> one_year_before(datetime.datetime(2012, 3, 1, 10, 0))
|
>>> one_year_before(datetime.datetime(2012, 3, 1, 10, 0))
|
||||||
datetime.datetime(2011, 3, 1, 10, 0)
|
datetime.datetime(2011, 3, 1, 10, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user