Today to string: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Fluxxdog
No edit summary
imported>Fxer
m Clarifying what this function does, add note how it is calculated
 
(3 intermediate revisions by one other user not shown)
Line 13: Line 13:
}}|
}}|


function_description=Returns the current date (based on your local computer's system settings) in an ISO basic format (YYYYMMDD).|
function_description=Returns the current real-world date corresponding to the KoL game date, where rollover is the start of a new day, in an ISO basic format (YYYYMMDD).|


needscode=yes|
needscode=yes|
Line 19: Line 19:
more_info=See this [http://en.wikipedia.org/wiki/ISO_8601 wikipedia article] for more information.|
more_info=See this [http://en.wikipedia.org/wiki/ISO_8601 wikipedia article] for more information.|
}}
}}
{{SeeAlso|gameday_to_string}}
 
[[Category:String Handling Routines]]
== Notes ==
The value returned is calculated from timezone GMT-3:30. Since rollover occurs at 8:30pm MST (UTC 3:30) this makes rollover occur at "midnight." Changing your local system time affects which day mafia thinks it is, but "midnight" will always be pinned to rollover.
 
{{SeeAlso|gameday_to_string|gameday_to_int|time_to_string|now_to_string}}
 
[[Category:Miscellaneous Functions]]

Latest revision as of 17:29, 2 June 2016

needs(code_samples);

Function Syntax

string today_to_string()

Returns the current real-world date corresponding to the KoL game date, where rollover is the start of a new day, in an ISO basic format (YYYYMMDD).

More Information

See this wikipedia article for more information.


Notes

The value returned is calculated from timezone GMT-3:30. Since rollover occurs at 8:30pm MST (UTC 3:30) this makes rollover occur at "midnight." Changing your local system time affects which day mafia thinks it is, but "midnight" will always be pinned to rollover.

See Also

gameday_to_string() | gameday_to_int() | time_to_string() | now_to_string()