From: PTrottier <31802216+PTrottier@users.noreply.github.com> Date: Fri, 27 Apr 2018 14:42:56 +0000 (-0400) Subject: Month and Day must be valid tokens X-Git-Tag: v2.6.0~7^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbc8cf8308d0958ddbde7a01c430c58a40c00308;p=thirdparty%2Fbabel.git Month and Day must be valid tokens ````>>> dt = datetime(2007, 04, 01, 15, 30, tzinfo=UTC) File "", line 1 dt = datetime(2007, 04, 01, 15, 30, tzinfo=UTC) ^ SyntaxError: invalid token```` See: https://docs.python.org/3.5/library/datetime.html#datetime.datetime.month --- diff --git a/docs/dates.rst b/docs/dates.rst index bb3398ab..0ddd7bc9 100644 --- a/docs/dates.rst +++ b/docs/dates.rst @@ -286,7 +286,7 @@ directly interface with it from within Babel: >>> from datetime import time >>> from babel.dates import get_timezone, UTC - >>> dt = datetime(2007, 04, 01, 15, 30, tzinfo=UTC) + >>> dt = datetime(2007, 4, 1, 15, 30, tzinfo=UTC) >>> eastern = get_timezone('US/Eastern') >>> format_datetime(dt, 'H:mm Z', tzinfo=eastern, locale='en_US') u'11:30 -0400'