/tg/ Station 13 - Modules - Types

code/__HELPERS/time.dm

/proc/weekday_to_iso Returns a string day as an integer in ISO format 1 (Monday) - 7 (Sunday)
/proc/iso_to_weekday Returns an integer in ISO format 1 (Monday) - 7 (Sunday) as a string day
/proc/day_of_month Returns the day (mon, tues, wen...) in number format, 1 (monday) - 7 (sunday) from the passed in date (year, month, day) All inputs are expected indexed at 1
/proc/time_to_twelve_hour Converts a time expressed in deciseconds (like world.time) to the 12-hour time format. the format arg is the format passed down to time2text() (e.g. "hh:mm" is hours and minutes but not seconds). the timezone is the time value offset from the local time. It's to be applied outside time2text() to get the AM/PM right.