/tg/ Station 13 - Modules - Types

code/__HELPERS/time.dm

/proc/weekday_to_isoReturns a string day as an integer in ISO format 1 (Monday) - 7 (Sunday)
/proc/iso_to_weekdayReturns an integer in ISO format 1 (Monday) - 7 (Sunday) as a string day
/proc/day_of_monthReturns 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_hourConverts 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.