ISO-8601 week format to Sun-Sat format?
Moderator: General Moderators
ISO-8601 week format to Sun-Sat format?
I'm working on a calendar app, and I need to figure out which week of the year a date is in. However, my calendar works on a Sunday-Saturday basis. The date() function has the 'W' format, which returns the ISO-8601 week number. This format considers a week to be Monday-Sunday. How can I either convert to Sun-Sat, or otherwise find it?
Well, I figured it out. In case anyone else was wondering, I used this to calculate the week of year based on a Sunday-Saturday week:
Code: Select all
strftime("%U",$timestamp);