Class Calendar.YMD.Week
- Description
-
The Calendar week represents a standard time period of a week. In the Gregorian calendar, the standard week starts on a sunday and ends on a saturday; in the ISO calendar, it starts on a monday and ends on a sunday.
The week are might not be aligned to the year, and thus the week may cross year borders and the year of the week might not be the same as the year of all the days in the week. The basic rule is that the week year is the year that has the most days in the week, but since week number only is specified in the ISO calendar - and derivates - the week number of most calendars is the week number of most of the days in the ISO calendar, which modifies this rule for the Gregorian calendar; the week number and year is the same as for the ISO calendar, except for the sundays.
When adding, moving and subtracting months to a week, it falls back to using days.
When adding, moving or subtracting years, if tries to place the moved week in the resulting year.
- Inherit YMD
inherit YMD : YMD
- Method create
Calendar.YMD.Week Calendar.YMD.Week(
"unix"
,int
unix_time
)
Calendar.YMD.Week Calendar.YMD.Week(
"julian"
,int
|float
julian_day
)
Calendar.YMD.Week Calendar.YMD.Week(
int
year
,int
week
)- Description
-
It's possible to create the standard week by using three different methods; either the normal way - from standard unix time or the julian day, and also, for more practical use, from year and week number.
Can be less than 1 for the first week of the year if it begins in the previous year.