Timestamp to date: Difference between revisions
Jump to navigation
Jump to search
Created page with "{{ #vardefine:name|timestamp_to_date}}{{ #vardefine:return_type|string}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={{#var:name}}| aggregate={{#var:aggre..." |
m int timestamp comes first, outformat second (https://github.com/loathers/kolmafia-js/blob/main/index.d.ts) |
||
| Line 11: | Line 11: | ||
return_type={{#var:return_type}}| | return_type={{#var:return_type}}| | ||
return_also={{#var:return_also}}| | return_also={{#var:return_also}}| | ||
parameter1={{Param|int|timestamp}}| | |||
parameter2={{Param|string|outFormat}}| | |||
p2desc={{pspan|dtg}} is the timestamp to convert.| | p2desc={{pspan|dtg}} is the timestamp to convert.| | ||
p1desc={{pspan|inFormat}} is how the output string is formatted.| | p1desc={{pspan|inFormat}} is how the output string is formatted.| | ||
Latest revision as of 21:57, 19 July 2025
Function Syntax
string timestamp_to_date(int timestamp ,string outFormat )
- inFormat is how the output string is formatted.
- dtg is the timestamp to convert.
Converts a UNIX timestamp (in milliseconds) to a date. Full information on SimpleDateFormat here.