WeekDateISO ( date )
Returns date in extended ISO 8601 week date format.
Average rating: 4.1 (39 votes) Log in to vote
Michael Horak - Show more from this author
*COMMENT Visual Realisation |
Jan 3, 2005
2005-W01-1
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Returns date in extended ISO 8601 week date format.
The International Standard ISO 8601 extended format representation of week dates is yyyy-Www-d, where W is the actual letter "W", ww refers to the two digit week number, and d is the day's number.
Weeks are represented by two digits beginning with 01 being the first week of the year, up to 52 or 53 being the last week of the year. The first week of a year is the first week that contains four or more days of that year. Weeks start with Monday.
Days are represented by a single digit beginning with 1 being Monday, ending with 7 being Sunday.
This function is not recursive.
Comments
Fabrice Nordmann, 1-more-thing Dec 2, 2010 |
||
Hi Michael, what a nice function! I don't dare giving you my previous calculation, it was such a mess compared to yours. I'm now looking for the reverse function : give a ISO week number and year, and get a date (or a list of dates). If by chance you have such a thing ready... Many thanks, Fabrice |
||
comment, VR Dec 2, 2010 |
||
Hi Fabrice, it shouldn't be very difficult. Hint: January 4 is ALWAYS within week 01. |
||
Fabrice Nordmann, 1-more-thing Dec 2, 2010 |
||
So simple indeed! Thanks ! Fabrice |
||
comment, VR Dec 25, 2011 |
||
Here's the reverse calculation: Let ( jan4 = Date ( 1 ; 4 ; ISOyear ) ; jan4 - Mod ( jan4 - 1 ; 7 ) + 7 * ( ISOweek - 1 ) + ISOweekDay - 1 ) |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.