Wikifunctions:Catalogue/Time operations
Appearance
See also: WF:Catalogue/Date operations
Time operations
Time of day operations
- same times (Z25098): returns true if the two times are identical
- hour of day (Z25082): returns the hour of the day from the time of day
- minute from time of day (Z25085): returns the seconds component of the time of day
- second from time of day (Z25088): returns the seconds component of the time of day
- time of day as hH:MM:SS string (Z25094): returns a string in hH:MM:SS format (the first hour character is dropped if the hour is one digit)
- time as 12-hour clock with AM/PM (Z25102): displays in the format "hH:MM:SS AM" where hH is between 1 and 12
- time as 12-hour clock with am/pm (Z25705): displays in the format "hH:MM:SS am" where hH is between 1 and 12
- time of day as 24-hour HH:MM:SS string (Z25701): always displays two digits for hours
- display Time of day (Z25091): String display function for the Time of day type, according to specified language.
- read Time of day (Z25118): reader function to leniently convert strings representing times of the day, respecting language conventions where ambiguous
- time of day as seconds past midnight (Z25108): convert the time of day to a number of seconds to enable easy comparison
- number of seconds from midnight to time of day (Z25179): Accounts also for the leap second. Doesn't handle a number of seconds that is greater than a day
- less than or equal (Time of day) (Z25113): returns true if the first time parameter is earlier or equal to the second time parameter
- add to time of day (Z25167): Add a specified number of hours, minutes and seconds to the time of day. Assumes no leap-second.
- number of seconds in day (Z25191): usually 86400 unless the day has a leap second when it is 86401
- fraction of regular day to time of day (Z25187): Inputs between 0 (inclusive) and 1 (normally exclusive). Beyond that it should wrap back into that range. 1 indicates almost a full day with a leap second (or can be used to represent a complete day).
- time as fraction of day (Z25207): converts a time of day object to a rational number in the range [0,1]
- convert hour angle (float) to time (Z27461): converts the hour angle from radians to hours, minutes and seconds from midday, for applications like the sunrise equation
- divide day in regular intervals (Z27225): Given the initial time and the number N, returns a list of N times of day with the same distance
- round Time of day to the nearest minute (Z29884): If the seconds key is 29 or under, there is no change in mintues or hours. Otherwise the minutes go up, and if they would be 60 they go to 0 and the hours go up, if they get to 24, they go to 0.