diff options
| author | Martin Trigaux <mat@odoo.com> | 2015-10-19 11:47:31 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2015-10-19 12:25:39 +0200 |
| commit | bc0986f53bc03bb958f3acce10ec23805afb7b6a (patch) | |
| tree | c1f0884b5a8b079413df714f377d231108440ceb /addons/web/static/src/js/framework | |
| parent | 102b337c6a3e805f17422d7880625758b0d90868 (diff) | |
[FIX] hr_timesheet_sheet: week number according to ISO 8601
The ISO weekday should be computed with isocalendar dateformat
The exact directive is '%V' according to GNU/Linux system strftime
http://man7.org/linux/man-pages/man3/strftime.3.html
However '%V' is not documented in official cross-platform syntax supported on
all python built, according to standardized by ANSI C formats
https://docs.python.org/2.7/library/datetime.html#strftime-and-strptime-behavior
as '%V' may not be supported on other platforms such as MS Windows, use the
cross-platform 'isoformat()' method.
Note that according to ISO 8601, the start and end of date may belong to the
previous or next year.
e.g.
>>> datetime.datetime.strptime('2005-01-01', '%Y-%m-%d').isocalendar()
(2004, 53, 6)
>>> datetime.datetime.strptime('2005-01-01', '%Y-%m-%d').strftime('%W')
'00'
Fixes #8927
Diffstat (limited to 'addons/web/static/src/js/framework')
0 files changed, 0 insertions, 0 deletions
