aweek
aweek copied to clipboard
Allow for varying first week of the year
This package conveniently handles week to date and date to week conversions with varying definitions of the first day in each week.
In epidemiology we are also confronted with varying definitions of week 1 in a year. The ISO norm says: "week 01 is the week with the Gregorian year's first Thursday in it", the week before being week 52 or 53 of the previous year. https://en.wikipedia.org/wiki/ISO_week_date#First_week
There is however situations in which week 1 is defined as the week containing 1st January, which is not always the same as above. Other definitions are also possible, e.g. the week containing the first Monday, Tuesday, ... Sunday of a year.
It would be great to add an option to choose which of these definitions should be used, with a default to the definition used by ISO.