summaryrefslogtreecommitdiff
path: root/tests/test_dates.py
Commit message (Collapse)AuthorAgeFilesLines
* Rephrase copyright headers to link to the LICENSE file instead of COPYINGauthorsAarni Koskela2018-02-021-1/+1
| | | | Fixes #398
* Update copyright header years, and include the Babel teamAarni Koskela2018-02-021-2/+2
|
* Test that CLDR 32 properly formats Russian start-of-year dates.cldr-32Aarni Koskela2018-01-251-0/+7
| | | | Fixes #485
* cldr: use CLDR 31.0.1 (and fix test changes); see below!cldr-30Aarni Koskela2018-01-171-7/+7
| | | | | | | | | | | | | | | | | | | | CLDR 31.0 separated the GMT and UTC time zones, so formatting of that time zone has changed. Most notably, "UTC" replaces "+0000" when formatting the timezone. This could break code that expects +0000. A subset (the parts supported by Babel) of the migration guide from http://cldr.unicode.org/index/downloads/cldr-31: * The locales in the language-territory population tables have been changed to be the canonical format, dropping the script where it is the default. So "ku_Latn" changes to "ku". * Plural rules: The Portuguese plural rules have changed so that all (and only) integers and decimal fractions < 2 are singular. * Timezones: The GMT timezone has been split from the UTC timezone. * Timezones: New timezone bcp47 codes have been added. * Languages "hr" and "sr" are no longer a short distance apart, for political reasons. * The primary names for CZ changed from "Czech Republic" to "Czechia", with the longer name now the alternate.
* Properly fall back to `long` metazone names when short forms are no-inheritAarni Koskela2016-07-151-0/+22
| | | | | | Thanks to @stringtheory for the bug report! Fixes #428
* Fix the way local time is constructed in testsIsaac Jurado2016-05-291-1/+2
| | | | | | In summer time zones, the test for "get_timezone_name" failed because the construct used to obtain a local time did not deal properly with DST offsets. As recommended by pytz, it is better to convert to local time from UTC.
* dates: Use format context and fallback through widthsAarni Koskela2016-04-081-0/+5
| | | | | | | | `zh_Hant` locale data does not have names for the `am` and `pm` day periods in the `format`/`abbreviated` context, so fallback logic is added to deal with that eventuality. Fixes #378
* Add flake8 pre-commit hook and apply fixes.Lukas Balaga2016-03-071-3/+1
|
* Merge pull request #355 from lukas-b/lukas_add_pre_commit_and_apply_fixesAarni Koskela2016-03-031-18/+21
|\ | | | | Add pre-commit and apply fixes
| * Apply pre-commit fixes.Lukas Balaga2016-02-271-18/+21
| |
* | dates: Add additional pattern for week daySachin Paliwal2016-03-011-0/+27
| | | | | | | | Added test cases and additional pattern for Weekday format
* | dates: Add additional pattern for quarterSachin Paliwal2016-03-011-0/+6
| | | | | | | | Added test cases and additional pattern for quarter format
* | format_datetime: using 'S...S' format is incorrectiamshubh222016-02-291-2/+14
|/ | | | Fixes https://github.com/python-babel/babel/issues/350
* dates: Add iso8601 pattern timezone FormatSachin Paliwal2016-02-051-0/+123
| | | | https://github.com/python-babel/babel/issues/325
* dates: Add Features in get timezone functionsSachin Paliwal2016-02-051-2/+10
| | | | | | | Added argument 'return_z' and two values 'iso8601' and 'iso8601_short' in argument width in get_timezone_gmt(), 'return_city' argument is add in get_timezone_location() and 'return_zone' in get_timezone_name() so we can implement iso8601 timezone patterns.
* dates: DRY out the internal datetime conversion codeAarni Koskela2016-01-231-2/+24
|
* Add support for date-time skeletonsMichael Birtwell2016-01-041-0/+9
| | | | | | | | The skeletons for dates and times are described on http://cldr.unicode.org/translation/date-time-patterns under Additional Date-Time Formats. And are useful when you want to some more control over formatting dates and times but don't want to force all locales to use the same pattern.
* Update to CLDR 28 (with test updates)Aarni Koskela2015-12-211-3/+3
| | | | | | | | | | * Aside from the usual data changes, the provisional aa locale is no longer, so we can't use it for tests. Instead, ii is used (chosen by virtue of ii.xml being fairly small, i.e. probably as incomplete as aa). * ms_Latn_SG is not in use anymore either; use sr_Latn_ME instead. Closes #226 Closes #290
* Test that Lithuanian long-form dates are formatted with the correct genitive ↵Aarni Koskela2015-12-211-0/+7
| | | | | | form of the month Fixes #288
* Test invalid format_timedelta() format parametersAlex Willmer2015-09-101-0/+8
|
* Add format_timedelta(format='narrow') supportAlex Willmer2015-09-101-0/+8
|
* Merge branch 'pr/136'Armin Ronacher2015-07-271-16/+15
|\
| * CLDR-26 support: Minor adjustments to tests. URL, filename and filehash.benselme2015-01-111-7/+7
| |
| * Fixed import and format_timedelta to handle new time unit patterns in cldr-24.benselme2015-01-091-9/+8
| | | | | | | | Fixed tests to account for various minor changes in cldr-24.
* | Fixed a bunch of broken timezone tests.Armin Ronacher2015-07-271-7/+7
|/
* Renamed a parameter (variation -> variant)Armin Ronacher2013-07-241-6/+6
|
* Improved timezone name supportArmin Ronacher2013-07-131-0/+14
|
* rewrite regression testAlex Morega2013-07-061-4/+4
|
* More work on making tests work on Python 3Armin Ronacher2013-07-061-9/+9
|
* Some small test cleanupsArmin Ronacher2013-07-061-1/+0
|
* remove test suite factoriesAlex Morega2013-07-061-15/+0
|
* copy babel.dates doctests as unit testsAlex Morega2013-07-061-2/+184
|
* move unit tests outside babel packageAlex Morega2013-07-061-0/+347