file: job.t package: muf status: alpha
{ millisecsSince1970 formatString -> formatted-string }
The printTime
provides functionality corresponding
to C's strftime(): it takes a date expressed as an integer
giving the time in milliseconds since 1970 (such as may be
obtained from .sys$s.millisecsSince1970), and a format string
similar to that used by ]print
, and returns a string
expressing the given time:
Stack: .sys$s.millisecsSince1970 "%c" printTime Stack: "94Aug13:00:08:33"
The full set of format characters supported is:
%A Long day of week: "Sunday" -> "Saturday". %a Short day of week: "Sun" -> "Sat" %B Long month: "January" -> "December" %b Short month: "Jan" -> "Dec" %h Same as above. %p "AM" or "PM". %Z Time zone: "PST" vs "PDT" (etc). %W Week of year: 00 -> 53 (Counting from first Monday) %d Day of month: 01 -> 31 %e Day of month: " 1" -> "31" %H Hour of day: 00 -> 23 %I Hour of halfday: 00 -> 12 %l Hour of halfday: " 0" -> "12" %j Day of year: 000 -> 366 %k Hour of day: " 0" -> "23" %M Minute of hour: 00 -> 59 %m Month of year: 01 -> 12 %S Second of minute: 00 -> 59 %U Week of year: 00 -> 53 (Counting from first Sunday) %w Day of week: 0 -> 6 (0=Sunday) %y Year of century: 00 -> 99 %Y Year common era: 1970 -> 1995 %s Seconds since 1970. %C Convenience format: "Sat Aug 13 00:18:36 1994" %c convenience format: "94Aug13:00:18:36" %D (Date) same as %m/%d/%y %x Same as above %R Same as %H:%M %r Same as %I:%M:%S %p %X Same as %H:%M:%S %T Same as above
Go to the first, previous, next, last section, table of contents.