Preferably in ruby, but the logic would be good enough...

I need the week number of the year given that the week is non-standard. So, say you define a week as Saturday -> Friday. Then, given a date, which week number (1-52) is it?

strftime has %U:

> Time.now.strftime('%U')
> => "28"

...but that of course assumes a standard Sunday -> Saturday week.

Edit
Report