Extracted from Pike v7.3 release 14 at 2002-02-15.
pike.roxen.com
[Top]
Calendar
Calendar.YMD
Calendar.YMD.Year

Method Calendar.YMD.Year()->week()


Method week

object(Week) Calendar.YMD.Year()->week()
object(Week) Calendar.YMD.Year()->week(int n)
object(Week) Calendar.YMD.Year()->week(string name)

Description

The Year type overloads the week() method, so it is possible to get a specified week by name:

year->week("17") year->week("w17")

The integer and no argument behavior is inherited from Calendar.YMD.YMD().

This is useful, since the first week of a year not always (about half the years, in the ISO calendar) is numbered '1'.