Chalten might help, i remember it had representations for months of years
(January of 1990), it might have something similar for weeks.
On 13 May 2016 at 05:40, Cédrick Béler wrote:
> Yes I agree. We may have a preference to set the week day start (fistDayOfWeek
> ?).
>
>
>
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
--- Begin Message ---
Thanks Ben
Davide
--
View this message in context:
http://forum.world.st/Week-number-from-a-date-tp4894486p4894576.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
--- End Message ---
On Thu, May 12, 2016 at 9:47 PM, Davide Varvello via Pharo-users
wrote:
>
>
> -- Forwarded message --
> From: Davide Varvello
> To: pharo-users@lists.pharo.org
> Cc:
> Date: Thu, 12 May 2016 06:10:12 -0700 (PDT)
> Subject: Week
--- Begin Message ---
Yep :-)
Davide
Sven Van Caekenberghe-2 wrote
> https://en.wikipedia.org/wiki/Week#Week_numbering
>
> of course, not all countries have the same definition of week.
> furthermore, week number does not seem to be so simple.
>
>> On 12 May 2016, at 18:17, Cédrick Béler
>
Not sure it exists (I didn’t find it but it may exists)… so I did a quick try
to code a new method in the class Week.
There is already index but this method returns the index of the current month.
I did something like below (not tested much):
Week>>yearIndex
^ (self dayOfYear / 7 + 1) asInteger
--- Begin Message ---
Hi guys,
Is there a way to have the week number when a date is given?
Ex: 2016/01/13 gives 2, 2016/01/19 gives 3, and so on
TIA
Davide
--
View this message in context:
http://forum.world.st/Week-number-from-a-date-tp4894484.html
Sent from the Pharo Smalltalk Users