Allow for locale-based parsing/formatting of dates (#11170)

* Allow for locale-based parsing/formatting of dates

* Updates based on review feedback of PR 11170

DateTimeLocale arrays are now indexed by Month and WeekDay enums.
More sane date used for testing.
Documentation newline.
Case change of DefaultLocale (and make it public)

* Add changelog entry for DateTimeLocale addition to times module

* Use pattern symbols for DateTimeLocale attribute names
This commit is contained in:
Matt Haggard 2019-05-08 05:48:04 -06:00 • committed by Andreas Rumpf
commit 8180d443b9
3 changed files with 86 additions and 91 deletions

View file

@ -193,6 +193,8 @@ proc enumToString*(enums: openArray[enum]): string =
- The switch ``-d:useWinAnsi`` is not supported anymore.
- In `times` module, procs `format` and `parse` accept a new optional `DateTimeLocale` argument for formatting/parsing dates in other languages.
### Language additions