Bugzilla@Mozdev – Bug 25012
Feature Request: variable for week # of current year
Last modified: 2013-06-05 08:10:15
You need to log in before you can comment on or make changes to this bug.
a variable for the week number of the current year would be a handy addition
Request accepted. However it is not quite as trivial as it sounds: http://www.blackwasp.co.uk/WeekOfYear.aspx The first day of the first week is not always the first of January, so it is likely that we will have to come up with more than one variable for this representing the various trains of thoughts of when the first calendar week is starting.
According to http://en.wikipedia.org/wiki/Week_number#Week_numbering , at least six systems are in use (of which three are listed there), and the system used in US and Canada differs from the ISO standard.
Created an attachment (id=7316) [details] Test Version - Pre272 Here is a test version that implements week numbers based on the rules of ISO 8601. Usage: %cwIso(offset)% , where 'offset' represents what you count as first day of the week, based on the following: 0 - Sunday 1 - Monday 2 - Tuesday 3 - Wednesday 4 - Thursday 5 - Friday 6 - Saturday so typically, in Europe you would probably use %cwIso(1)%, in Northern America %cwIso(0)%
Test Version - Pre272 this Version don't work for me. On new messages i get our Prompt window "Cant't be used for new Messages" and on reply the fields stay empty - german Windows 7
Created an attachment (id=7317) [details] 0.9 pre 277 this one should work better in any locale. there was a problem in the localization function with potential to impact which is now much improved. localization is now based on Operating System Locale and doesn't try to guess Application locale.