summaryrefslogtreecommitdiff
path: root/django/utils/dateformat.py
AgeCommit message (Collapse)Author
2017-09-07Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."Tim Graham
This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda because try/except performs better.
2017-06-28Fixed #27818 -- Replaced try/except/pass with contextlib.suppress().Mads Jensen
2017-04-27Refs #27795 -- Replaced many force_text() with str()Claude Paroz
Thanks Tim Graham for the review.
2017-02-11Refs #27656 -- Updated django.utils docstring verbs according to PEP 257.Anton Samarchyan
2017-02-07Converted usage of ugettext* functions to their gettext* aliasesClaude Paroz
Thanks Tim Graham for the review.
2017-01-26Refs #23919, #27778 -- Removed obsolete mentions of unicode.Vytis Banaitis
2017-01-25Removed unused variables that are overwritten.Mads Jensen
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-11-14Fixed #27463 -- Fixed E741 flake8 warnings.Ramin Farajpour Cami
2016-05-10Fixed #26580 -- Updated references to obsolete RFC 2822.Vasiliy Faronov
Didn't rename django.utils.feedgenerator.rfc2822_date() as some external code may rely on it.
2016-04-20Fixed #26281 -- Added a helpful error message for an invalid format ↵Marko Benko
specifier to dateformat.format().
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-02-06Sorted imports with isort; refs #23860.Tim Graham
2013-11-03Fixed all E226 violationsAlex Gaynor
2013-11-02Correct flake8 E302 violationsRay Ashman Jr
2013-11-02Correct flake8 violation E261Ray Ashman Jr
2013-10-23Fixed E225 pep8 warnings.Tim Graham
2013-09-10Fixed #20841 -- Added messages to NotImplementedErrorsGregor MacGregor
Thanks joseph at vertstudios.com for the suggestion.
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-05-17Replaced an antiquated pattern.Aymeric Augustin
Thanks Lennart Regebro for pointing it out.
2012-09-22Fixed #18951 -- Formatting of microseconds.Aymeric Augustin
Thanks olofom at gmail com for the report.
2012-08-07[py3] Ported django.utils.encoding.Aymeric Augustin
* Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
2012-07-22[py3] Replaced unicode/str by six.text_type/bytes.Aymeric Augustin
2012-06-07Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
2012-04-30Replaced print statement by print function (forward compatibility syntax).Claude Paroz
2012-02-10Updated a few localization formats to stop the changes done in r17473 from ↵Jannis Leidel
breaking the tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-09Fixed #16416 -- Added two new date formatting options for timezones and ISO ↵Jannis Leidel
week numbers. Thanks, poirier. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17473 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-18Added support for time zones. Thanks Luke Plant for the review. Fixed #2626.Aymeric Augustin
For more information on this project, see this thread: http://groups.google.com/group/django-developers/browse_thread/thread/cf0423bbb85b1bbf git-svn-id: http://code.djangoproject.com/svn/django/trunk@17106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-25Fixed #16924 -- Corrected `date` template filter handling of negative (West ↵Ramiro Morales
of UTC) timezone offsets. The 'O' format specifier output was incorrect. Thanks mrgriscom and Aymeric Augustin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-13Fixed #14570 -- Added new date format character for alternative month names ↵Jannis Leidel
using the new context capabilities. Also add context to Associated Press style month names (refs #9988). Thanks to Claude and shell_dweller. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14899 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-16Fixed #13547 -- Made sure the ISO 8601 date formatting introduced in r12058 ↵Jannis Leidel
uses "T" as the separator between the date and the time value to increase real world usefulness. While the ISO standard permits the use of a space instead of "T" for readability, it does have an impact on standards like HTML5 which rely on specific rules made in RFC 3339. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13266 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-01Fixed #7262 - Added ISO 8601 and microsecond format string to ↵Jannis Leidel
utils.dateformat. Thanks zegor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12058 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08Fixed #10825: fixed the 'U' format code to dateformat (and the date/now ↵Jacob Kaplan-Moss
filter/tag). Thanks to gsong and mir. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10716 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-28Fixed #10048 -- Handle non-existent timezone in dateformat functions.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9919 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-22Fixed #7847 -- Removed a whole bunch of unused imports from throughout the ↵Adrian Holovaty
codebase. Thanks, julien git-svn-id: http://code.djangoproject.com/svn/django/trunk@8046 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-04Fixed #5869 -- Corrected documentation for `now` template tag's "r" format ↵Gary Wilson Jr
character. Thanks, xavier.morel@masklinn.net. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6640 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-16Fixed #2633 -- Fixed timezone computation in O() format function, using fix ↵Malcolm Tredinnick
from [6300]. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15Fixed #5470 -- Fixed the 'Z' time format marker in templates to handle ↵Malcolm Tredinnick
timezones west of UTC. Thanks, Paul Lanier. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-12Fixed #4768 -- Converted timesince and dateformat to use explicit floor ↵Russell Keith-Magee
division (pre-emptive avoidance of Python 3000 compatibility problem), and removed a redundant millisecond check. Thanks, John Shaffer <jshaffer2112@gmail.com>. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-04Merged Unicode branch into trunk (r4952:5608). This should be fullyMalcolm Tredinnick
backwards compatible for all practical purposes. Fixed #2391, #2489, #2996, #3322, #3344, #3370, #3406, #3432, #3454, #3492, #3582, #3690, #3878, #3891, #3937, #4039, #4141, #4227, #4286, #4291, #4300, #4452, #4702 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-11Fixed #2998 -- Wrapped a couple more strings for translation. Thanks, JannisMalcolm Tredinnick
Leidel. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-28Fixed #3488: Added "b" option to date format filter. Thanks, Gary Wilson.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4647 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-18Changed dateformat 'M' to use MONTHS_3 instead of MONTHS, for better support ↵Adrian Holovaty
of translations git-svn-id: http://code.djangoproject.com/svn/django/trunk@4226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08Fixed #2109 -- Convert old-style classes to new-style classes throughout ↵Adrian Holovaty
Django. Thanks, Nicola Larosa git-svn-id: http://code.djangoproject.com/svn/django/trunk@3113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-11-06Fixed #742 -- Implemented 't' dateformat. Thanks, radek.Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1116 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-22Fixed #479 -- Implemented time-zone formats in dateformat. Thanks, SuneAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2005-10-20Fixed #654 -- Fixed bug in [969]. Thanks, korpios@gmail.comAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@976 bcc190cf-cafb-0310-a4f2-bffc1f526a37