Difference between revisions of "NXSL:strftime"

26 bytes added ,  16:13, 13 September 2022
m
Text replacement - "^" to "{{deprecated}}"
(Added function description)
m (Text replacement - "^" to "{{deprecated}}")
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
__NOTOC__
{{deprecated}}__NOTOC__
Formats a Unix timestamp, and returns a string according to given formatting rules.
Formats a Unix timestamp, and returns a string according to given formatting rules.


Line 21: Line 21:


== Examples ==
== Examples ==
 
<pre>
strftime("%Y-%m-%d %H:%M", time()) -> 2016-01-19 12:14
strftime("%Y-%m-%d %H:%M", time()) -> 2016-01-19 12:14
strftime("%Y-%m-%d %H:%M - timezone %Z - offset from UTC - %z", time()) -> 2016-01-19 12:14 - timezone CET - offset from UTC - +0100
strftime("%Y-%m-%d %H:%M - timezone %Z - offset from UTC - %z", time()) -> 2016-01-19 12:14 - timezone CET - offset from UTC - +0100
</pre>