[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
XPweekNr()
Return Week Number according to ISO standards
------------------------------------------------------------------------------
Function: XPweekNr()
Syntax: XPweekNr([dVar]) --> nWeek
Arguments: dVar is a date, defaults to date() (ie. today).
Returns: The week number according to standards set out by ISO.
Note that at the end of a year, one can be in week 1, this
then means that it is week 1 of the next year. Same applies
to the beginning of the year, where one can be in week 52 or
53, which indicates that week from the previous year.
See the WeekYear() function, which indicates in which
year the numbering applies to. Generally same year, but
sometimes, it differs.
Usage: XPweekNr(XPstod('19911229')) --> 52 // last week
XPweekNr(XPstod('19911230')) --> 1 // of next year
XPweekNr(XPstod('19920101')) --> 1 // this year
XPweekNr(XPstod('19930103')) --> 53 // previous year
Note: Credits go to Robert Franklin Lamping for pointing me
out the ISO standards "Numbering of weeks" in an Article,
and for the Clipper Summer '87 demo code illustrating the
concepts. The standard in question is ISO 2015 1976.
See Also:
XPweekYear()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson