Difference between revisions of "Gameday to string"

From Kolmafia
Jump to navigation Jump to search
imported>Fluxxdog
(Created page with '{{ #vardefine:name|gameday_to_string}}{{ #vardefine:return_type|string}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={{#var:name}}| aggregate={{#var:aggregat…')
 
imported>Bale
(gameday_to_int)
Line 28: Line 28:
 
== Notes ==
 
== Notes ==
 
The value returned prints actual game date, so it is influenced by rollover. [[today_to_string]]() is determined by your computer's own clock.
 
The value returned prints actual game date, so it is influenced by rollover. [[today_to_string]]() is determined by your computer's own clock.
{{SeeAlso|today_to_string}}
+
{{SeeAlso|today_to_string|gameday_to_int}}
 
[[Category:String Handling Routines]]
 
[[Category:String Handling Routines]]

Revision as of 08:14, 13 September 2010

Function Syntax

string gameday_to_string()

Returns the current KoL game date using the in game calendar.

Code Samples

This code will print a special message if it's Bill 3, the day for the Generic Summer holiday.

if (gameday_to_string() == "Bill 3") {
  print("I feel like taking a dip in the fountain today!");
}

CLI Equivalent

The CLI command "moon" will also print the current game date along with other information.


Notes

The value returned prints actual game date, so it is influenced by rollover. today_to_string() is determined by your computer's own clock.

See Also

today_to_string() | gameday_to_int()