summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_dateformat.py
AgeCommit message (Collapse)Author
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-02-18Refs #36005 -- Used datetime.UTC alias instead of datetime.timezone.utc.Mariusz Felisiak
datetime.UTC was added in Python 3.11.
2024-01-04Used enterClassContext() where appropriate.Mariusz Felisiak
2023-12-31Used addCleanup() in tests where appropriate.Mariusz Felisiak
2023-01-17Refs #32365 -- Removed support for pytz timezones per deprecation timeline.Mariusz Felisiak
2023-01-05Added support for datetime.date to DateFormat.r().Nick Pope
2022-03-24Refs #32365 -- Removed internal uses of utils.timezone.utc alias.Carlton Gibson
Remaining test case ensures that uses of the alias are mapped canonically by the migration writer.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-07-13Completed test coverage for django.utils.dateformat.Nick Pope
2021-07-13Used subTest() in utils_tests.test_dateformat.Nick Pope
2021-05-12Fixed #32366 -- Updated datetime module usage to recommended approach.Nick Pope
- Replaced datetime.utcnow() with datetime.now(). - Replaced datetime.utcfromtimestamp() with datetime.fromtimestamp(). - Replaced datetime.utctimetuple() with datetime.timetuple(). - Replaced calendar.timegm() and datetime.utctimetuple() with datetime.timestamp().
2021-05-12Fixed #32735 -- Made DateFormat.Y() return a zero-padded year.Nick Pope
2020-11-12Simplified TimeFormat.g().Nick Pope
2020-11-12Fixed #32149 -- Added support for years < 1000 to DateFormat.y().Sam
2019-11-22Fixed #9762 -- Made DateFormat.r() locale-independent.Baptiste Mispelon
Thanks to Antonio Melé for the original report all those years ago and to all the contributors who helped along the way.
2019-11-22Refs #26281 -- Added a helpful error message for an invalid "r" specifier to ↵Baptiste Mispelon
dateformat.format().
2019-11-18Refs #30990 -- Added test for 'z' date format with a leap year.Baptiste Mispelon
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-10-27Fixed #27327 -- Simplified time zone handling by requiring pytz.Tim Graham
2016-04-20Fixed #26281 -- Added a helpful error message for an invalid format ↵Marko Benko
specifier to dateformat.format().
2016-01-05Skipped a dateformat test on Windows as needed.Tim Graham
Refs 1014ba026e879e56e0f265a8d9f54e6f39843348
2015-11-07Fixed debug view crash during autumn DST change.Aymeric Augustin
This only happens if USE_TZ = False and pytz is installed (perhaps not the most logical combination, but who am I to jugde?) Refs #23714 which essentially fixed the same problem when USE_TZ = True. Thanks Florian and Carl for insisting until I wrote a complete patch.
2015-05-20Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-01-12Fixed #21756 -- Skipped two timezone-related tests on Windows.Aymeric Augustin
Windows cannot use a time zone other than the default time zone. Thanks manfre for the report.
2013-12-23Imported override_settings from its new location.Aymeric Augustin
2013-09-10Fixed test that fails when pytz is installed.Aymeric Augustin
pytz' localize() method is the bane of my life.
2013-09-09Refactored code and tests that relied on django.utils.tzinfo.Aymeric Augustin
Refs #17262.
2013-08-26Fixed #20693 -- Add timezone support to built-in time filter.Warren Smith
Modified django.utils.dateformat module, moving __init__() method and timezone-related format methods from DateFormat class to TimeFormat base class. Modified timezone-related format methods to return an empty string when timezone is inappropriate for input value.
2013-07-01Fixed a few more imports of django.utils.unittest.Aymeric Augustin
One import per line please! Refs #20680.
2013-04-12Modified utils_tests for unittest2 discovery.Preston Timmons