From cbc8cf8308d0958ddbde7a01c430c58a40c00308 Mon Sep 17 00:00:00 2001 From: PTrottier <31802216+PTrottier@users.noreply.github.com> Date: Fri, 27 Apr 2018 10:42:56 -0400 Subject: [PATCH] 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 --- docs/dates.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' -- 2.47.2