|
Download DateTimeLib
Other Programs by the same Author Disclaimer Source code library with 25 routines for computation of date and time functions since the Gregorian Calendar was introduced on 1582-Oct-15. The programming language is Autohotkey which can be read and transfered easily by everyone who can read Pascal, Basic or Fortran. Content:
The Routines in Detail:Format H24MISS: String in the format "20090619012627": YYYYMMDDhhmmss |
OutVar | Name of Routine | Formal Parameter | Example | |
---|---|---|---|---|
strDate | := | fDate_YYYYMMDD | ( H24MISS ) | "2005-06-19" |
strTime | := | fDate_HHMMSS | ( H24MISS ) | "07:08:11" |
strTime | := | fDate_HHMM | ( H24MISS ) | "07:08" |
strTime | := | fTime_HHMMSS | ( Seconds ) | "321:08:05.123" / "321:08:05" |
strTime | := | fTime_HHMMSS000 | ( Seconds, iDecimals ) | |
strTime | := | fTime_HHMM | ( Seconds ) | "321:08" |
strTime | := | fTime_DDHHMMSS | ( Seconds ) | "13_09:08:05.123" / "13_09:08:05" |
strTime | := | fTime_DDHHMM | ( Seconds ) | "13_09:08" |
dblSeconds | := | fTime_Dbl_HHMMSS | ( I:Hours, I:Min, I:Sec, I:Millisec ) | Double: Seconds since midnight |
Day1582 | := | fDate_AHK_Day1582 | ( H24MISS ) | DayNo since 1582 |
strDate | := | fDate_YYMMDD_strDate | ( Year, Month, Day ) | "2005-06-19" |
Day1582 | := | fDate_YYMMDD_Day1582 | ( Year, Month, Day ) | DayNo since 1582 |
strDate | := | fDate_Day1582_strDate | ( Day1582 ) | |
intError | := | fDate_Day1582_YYMMDD | ( I:Day1582, O:Year, O:Month, O:Day ) | Err > 0: Day1582 incorrect + YY, MM, DD may also be called as Sub without "intError := " |
booLeapYear | := | fDate_LeapYear | ( Year ) | True = is Leap Year False = no Leap Year |
Days_in_Month | := | fDate_Days_in_Month | ( Year, Month ) | 28 (29 if leap year) / 30 / 31 |
Days_in_Month | := | fDate_Days_in_Month_Debug | ( Called_By, Year, Month ) | 28 (29) / 30 / 31 Output of calling routine if error occurred |
Days_in_Month | := | fDate_Days_in_Month_Internal | ( Year, Month ) | Internal use only |
Day_of_Week | := | fDate_Day_of_Week | ( Year, Month, Day ) | Out: 1=Sun .. 7=Sat |
Name_of_Day | := | fDate_Day_Name | ( Day_of_Week ) | "Sunday", … |
DayDiff_to_local | := | fDate_UTC_LocaleTimeReg | ( ) | difference UTC to local time [days] from Registry |
Day1582_DST_Start | := | fDate_DST_Start | ( Day1582 ) | DST start in this year: e.g. last Sunday in March, 02:00 1. Jan. <= Day1582 <= 31. Dec. |
Day1582_DST_End | := | fDate_DST_End | ( Day1582 ) | DST end in this year: e.g. last Sunday in October, 02:00 1. Jan. <= Day1582 <= 31. Dec. |
DST_Active | := | fDate_DST_Active | ( Day1582 ) | 0 = Day1582 outside DST 1 = Day1582 between DST start and end |
fDate_DST_StartEndSet | (DST_Month_Start, DST_Month_End ) | e.g. 3=March, 10=October |