Yes I agree. We may have a preference to set the week day start (fistDayOfWeek ?).After that we could agree on the fact the first week is the first complete week (otherwise it can be a preference).Then we need to find the first day index of the first fistDayOfWeek.(Date year: self year day: 1) weekdayIndex �� ��-> gives the index according to the preference (for now Sunday -> 1)Then it���s quite straightforward to get the week number.Just have to check if the current date is in the last week of the previous year (returns 52 or 53).I did something but not sure yet (but no preference).There are been some works on time representation (Chronos if I remember well ? but cannot load in Pharo 5, depends on OSProcess).An interesting read [1].Cheers,C��drikps:��http://stephane.ducasse.free.fr/Teaching/CoursAnnecy/0506-M1-COO/A%20New%20Object-Oriented%20Model%20of%20the%20Gregorian%20Calendar.pdf��
Interesting to know. But I see this already seems hard coded...
Date nameOfDay: 1 "--> #Sunday"
Timespan subclass: #Date
poolDictionaries: 'ChronologyConstants'
ChronologyConstants class >> initialize
DayNames := #(Sunday Monday Tuesday Wednesday Thursday Friday Saturday).
Also seems to have changed at some point, with the historical
nameOfDay recorded in the Terse Guide [1] circa 2010 shown to be
different. Perhaps this is something we should make a regional
preference. Was there any ongoing works on other regional
preferences?