time: Time and date

This module contains classes and a utility functions for dealing with times and dates. Date calculations assume the Gregorian calendar that is used everywhere in the Western world. Dates before the initiation of the Gregorian calendar can be used, but they are extrapolated and not historically accurate.

Note: These classes are not aware of time zones and leap seconds.

Classes

Date
This class represents a date or a day, for example April 17, 2010.
Time
This class represents elapsed time, for example 3 days, 4 hours and 2.6 seconds.
DateTime
This class represents a specific point in time, for example April 17, 2010, 11:25:03.5.

Constants

These constants can be used to specify how the week number of a date is calculated.

FirstWeek as Constant
The week with January 1 is the first week of a year.
FirstFourDayWeek as Constant
The first week with at least four days (the first week with a Wednesday) is the first week of the year.
FirstFullWeek as Constant
The first week with 7 days is the first week of the year.

Functions

DaysInMonth(year as Int, month as Int) as Int
Return the number of days in a specific month.