User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

strftime [2006/08/29 20:18]
strftime [2006/08/29 20:18] (current)
Line 1: Line 1:
 +# $EPIC: strftime.txt,​v 1.5 2006/08/29 18:22:56 sthalik Exp $
 +$__strftime__(<​format>​) \\
 +$__strftime__(<​time_t>​ <​format>​)
 +   * If the <​format>​ argument is omitted the empty string is returned.
 +   * If the <​format>​ argument is invalid the empty string is returned.
 +   * The first argument is optional. ​ If provided it must be the number of seconds since the epoch (e.g. $[[time function|time]]()). ​ If a time is not provided, the current $[[time function|time]]() is used.
 +   * The rest of the argument(s) are taken as a strftime(3) format string and are passed directly to strftime(3).
 +   * The return value of the function is the specified time converted into the human readable form described by your strftime(3) format.
 +   * Avoid using system-specific strftime(3) formats for portability reasons.
 +You should refer to your system'​s strftime man page (``man strftime''​)
 +for exact details of what a strftime format looks like, because describing
 +them is beyond the scope of a help file. =)  But this function is very
 +useful for creating timestamps that look just like how you want them.
 +A description of the specified <​time_t>​ using the format string <​format>,​
 +as processed by strftime(3).
 +$strftime(%d %B %Y)  might return "13 December 1996"
 +$strftime(%x at %X)  might return "​12/​13/​96 at 16:​45:​42"​
 +$strftime(%m/​%d/​%y) ​ might return "​07/​16/​01"​
 +$strftime(%Y/​%m/​%d) ​ might return "​2001/​07/​16"​
 +This function first appeared in ircII-2.8.1,​ and was first included
 +in EPIC3pre8.
strftime.txt ยท Last modified: 2006/08/29 20:18 (external edit)