Date

Dates are 32-bit signed ints representing the number of days since the birth of Christ. Negative values represent B.C.E. dates. CDateStruct Class class CDateStruct DayOfWeek Funct Day of week, given 32-bit day since AD 0. FirstDayOfMon Funct First day of month, given 32-bit day since AD 0. FirstDayOfYear Funct First day of year, given 32-bit day since AD 0. LastDayOfMon Funct Last day of month, given 32-bit day since AD 0. LastDayOfYear Funct Last day of year, given 32-bit day since AD 0. YearStartDate Funct 32-bit day since AD 0, given year number. mon_start_days1 GlbVar U16 mon_start_days1[12]={ mon_start_days2 GlbVar U16 mon_start_days2[12]={

Date/CDate

TempleOS uses a 64-bit value, CDate, for date/time. The upper 32-bits are the days since Christ. The lower 32-bits store time of day divided by 4 billion which works out to 49710ths of a second. You can subtract two CDate's to get a time span. Use CDATE_FREQ to convert. CDate Class I64 class CDate CDateStruct Class class CDateStruct Date2Struct Funct Cvt CDate to CDateStruct. Now Funct Current datetime. Str2Date Funct "*+nnnn", "*-nnnn", "mm/dd", "mm/dd/yy" Struct2Date Funct Cvt CDateStruct to CDate. local_time_offset GlbVar CDate local_time_offset;