DayWeekYear2Date ( dayNR ; weekNR ; yearNR )
Turns DayNr. WeekNr. & Year into a Date
Average rating: 3.9 (49 votes) Log in to vote
Arjen van der Ree Maxperts http://www.maxperts.nl |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
In many overviews (calendars e.g.) users want to use week numbers & years to see a set of days (mon - fri). This function makes is easy to translate from week-numbers, years and day-numbers (2=monday ... 6 = friday) to calculate say 5 dates to relate to records/portals in a week view.
I couldn't find anything like this on the internet and it took quite some time and testing to get is to work properly.
[dayNR ; 2 .. 5 (mon - fri) ]
[weekNR ; 1 ... 53*
[yearNR ; any year that Filemaker supports ]
*week-number 53 will goto wk 1 the following year in most cases.
Comments
comment, VR Dec 25, 2011 |
||
Couldn't this be simpler? See: http://www.briandunning.com/cf/229 |
||
Peter Bouma, Amsterdam Mar 18, 2016 |
||
I'm not happy with the declaration of script variables ($...) in this function. They should remain local/private within the Let statement of this CF. One way to mark them as private is to use '~' or '@' (in fact anything different from '$' or '$$') instead of the '$' prefix used here. | ||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.