summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2014-10-13 18:42:23 +0200
committerOlivier Dony <odo@openerp.com>2014-10-13 19:15:37 +0200
commitc0644a547444a5c33e5b9c7e2e55f7f45a2889b7 (patch)
tree67b6af0cb6209c332e40d5a6b3b819a86619af70 /doc/reference
parentc8e14f301f2ecdd8ff4ddbf032edddea323a3411 (diff)
[FIX] read_group: date format: use natural year along with month names, do not mix with ISO week-year
The ISO week-year notation can produce confusing values when the first week of the year is so short that it becomes week 0 and is considered the last week of the previous year, depending on the locale. For instance, using ISO notation: 'W53 2015' == dates.format_date( date(2015,1,1), format="'W'w YYYY", locale='en_GB') 'W53 2005' == dates.format_date( date(2006,1,1), format="'W'w YYYY", locale='de_DE') This is surprising but actually valid. However it definitely yields wrong output when combined with months formats: 'January 2014' == dates.format_date( date(2015,1,1), format="MMMM YYYY", locale='en_GB') As a result we must always use `y` to denote the year in any date format, *except* when it is combined with the week number `w`, in which case we must use `Y`. See the documentation at: http://babel.pocoo.org/docs/dates/#date-fields
Diffstat (limited to 'doc/reference')
0 files changed, 0 insertions, 0 deletions