Dates, Times, Durations
brent.pinkney at aircom.co.za
Mon Jan 24 14:26:40 UTC 2005
Here it is again:
> On Thu, 20 Jan 2005 13:13:45 -0500, Jason Rogers
> <jacaetevha at fast-mail.org> wrote:
>> I would like to calculate the number of work hours between two dates
>> with the basis of a workday being 9:00 to 17:00.
hours := 0.
(('1 January 2005' asDate) to: ('28 May 2005' asDate))
datesDo: [ :d | (d dayOfWeek between: 2 and: 6) ifTrue: [ hours := hours
+ 8. ] ]
More information about the Squeak-dev