Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-strftime Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 04:04:32 2022 GMT+0.
Next: Systems, Previous: The cl-strftime Reference Manual, Up: The cl-strftime Reference Manual [Contents][Index]
CL-STRFTIME is a Common Lisp compiler for the strftime “language.” FORMAT-TIME takes four arguments: a stream, a strftime-style control string, a time (defaults to now), and a time zone (defaults to here). (cl-strftime:format-time t "%D" (get-universal-time)) => 02/12/12 The stream argument may be NIL or T, as for FORMAT. The time argument may be a universal time or a LOCAL-TIME timestamp. The time zone should be NIL, for here; T, for UTC; or a time zone object in LOCAL-TIME'S format. The other exported function, MAKE-TIME-FORMATTER, is to FORMAT-TIME as FORMATTER is to FORMAT. FORMAT-TIME also understands a number of named formats. To use a named format, pass a keyword in place of the control string. (cl-strftime:format-time t :rfc-3339 (get-universal-time)) => 2012-03-19T06:16:29Z FORMAT-TIME understands the following flags and directives: FLAGS - Do not pad _ Pad with spaces 0 Pad with zeros # Toggle case ^ Upcase DIRECTIVES %% Literal percent sign %A Weekday (Sunday) %a Abbreviated weekday (Sun) %B Month (January) %b Abbreviated month (Jan) %C Century (20) %d Day of month (01-31) %D Same as %m/%d/%y %e Same as %_2d %F Same as %Y-%m-%d %G ISO 8601 year %g ISO 8601 year in century %h Same as %b %H Hour (01–24) %I Hour (01–12) %j Day of year (001-366) %k Hour ( 1-24) %l Hour ( 1-12) %m Month (01-12) %M Minute (00-59) %n Literal newline %p AM or PM %P am or pm %r Same as %I:%M:%S %p %R Same as %H:%M %s Epoch time %S Second (00-59) %t Literal tab %T Same as %H:%M:%S %u Day of week (weeks start on Monday) %U Week number %V ISO 8601 week number %w Day of week %W Week number (weeks start on Monday) %y Year of century (12) %Y Year (2012) %z RFC 2822 timezone %Z Name of timezone NAMED FORMATS (Formats on the same line are synonyms.) :ARPA :EMAIL :RFC-822 :ASCTIME :CTIME :COOKIE :HTTP :RFC-2616 :NEWS :RFC-850 :USENET :RSS :RFC-2822 :RFC-1036 :RFC-2086 :RFC-1132 :UNIX :W3C :HTML :RFC-3339 :XML :ATOM CL-STRFTIME goes to great lengths to be compatible with strftime. In fact it uses generative testing to ensure its results match those generated by `date`.
Next: Files, Previous: Introduction, Up: The cl-strftime Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
Common Lisp compiler for the strftime language.
Paul M. Rodriguez <pmr@ruricolist.com>
MIT
Next: Packages, Previous: Systems, Up: The cl-strftime Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: cl-strftime/package.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
cl-strftime (system).
Next: cl-strftime/time.lisp, Previous: cl-strftime/cl-strftime.asd, Up: Lisp [Contents][Index]
cl-strftime (system).
Next: cl-strftime/directives.lisp, Previous: cl-strftime/package.lisp, Up: Lisp [Contents][Index]
package.lisp (file).
cl-strftime (system).
Next: cl-strftime/named-format.lisp, Previous: cl-strftime/time.lisp, Up: Lisp [Contents][Index]
time.lisp (file).
cl-strftime (system).
Next: cl-strftime/math.lisp, Previous: cl-strftime/directives.lisp, Up: Lisp [Contents][Index]
directives.lisp (file).
cl-strftime (system).
Next: cl-strftime/cl-strftime.lisp, Previous: cl-strftime/named-format.lisp, Up: Lisp [Contents][Index]
named-format.lisp (file).
cl-strftime (system).
Previous: cl-strftime/math.lisp, Up: Lisp [Contents][Index]
math.lisp (file).
cl-strftime (system).
Next: Definitions, Previous: Files, Up: The cl-strftime Reference Manual [Contents][Index]
Packages are listed by definition order.
Next: Indexes, Previous: Packages, Up: The cl-strftime Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Public Interface, Up: Public Interface [Contents][Index]
Previous: Compiler macros, Up: Public Interface [Contents][Index]
Write TIME to STREAM as instructed by FORMAT.
TZ may be ‘nil’ (for the current default timezone), ‘t’ (for GMT), or
an object of type ‘local-time::timezone’.
FLAGS
- Do not pad
_ Pad with spaces
0 Pad with zeros
# Toggle case
^ Upcase
DIRECTIVES
%% Literal percent sign
%A Weekday (Sunday)
%a Abbreviated weekday (Sun)
%B Month (January)
%b Abbreviated month (Jan)
%C Century (20)
%d Day of month (01-31)
%D Same as %m/%d/%y
%e Same as %_2d
%F Same as %Y-%m-%d
%G ISO 8601 year
%g ISO 8601 year in century
%h Same as %b
%H Hour (01–24)
%I Hour (01–12)
%j Day of year (001-366)
%k Hour ( 1-24)
%l Hour ( 1-12)
%m Month (01-12)
%M Minute (00-59)
%n Literal newline
%p AM or PM
%P am or pm
%r Same as %I:%M:%S %p
%R Same as %H:%M
%s Epoch time
%S Second (00-59)
%t Literal tab
%T Same as %H:%M:%S
%u Day of week (weeks start on Monday)
%U Week number
%V ISO 8601 week number
%w Day of week
%W Week number (weeks start on Monday)
%y Year of century (12)
%Y Year (2012)
%z RFC 2822 timezone
%Z Name of timezone
NAMED FORMATS
(Formats on the same line are synonyms.)
:ARPA :EMAIL :RFC-822
:ASCTIME :CTIME
:COOKIE
:HTTP :RFC-2616
:NEWS :RFC-850 :USENET
:RSS :RFC-2822 :RFC-1036 :RFC-2086
:RFC-1132
:UNIX
:W3C :HTML :RFC-3339 :XML :ATOM
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Special variables, Previous: Internals, Up: Internals [Contents][Index]
Hours ante/post meridian.
Years in a century.
Hours in a day.
Length of a cycle in the Gregorian calendar.
Seconds in an hour.
Days in a leap year.
Maximum number of days in a month.
Days in a week.
Days in a (non-leap) year.
Months in a year.
Next: Symbol macros, Previous: Constants, Up: Internals [Contents][Index]
Next: Ordinary functions, Previous: Special variables, Up: Internals [Contents][Index]
Next: Types, Previous: Symbol macros, Up: Internals [Contents][Index]
Return the day of week from 1–7, where 1 is Monday.
The day of year of TIME, counting from 1.
Previous: Ordinary functions, Up: Internals [Contents][Index]
A day of the month.
An hour.
A minute.
A month.
A minute.
A week of the year.
A day of the week.
A year.
Previous: Definitions, Up: The cl-strftime Reference Manual [Contents][Index]
Jump to: | A C D E F I L M N O P S T W Y |
---|
Jump to: | A C D E F I L M N O P S T W Y |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | *
+
A C D G H I L M N S T U W Y Z |
---|
Jump to: | *
+
A C D G H I L M N S T U W Y Z |
---|
Jump to: | C D F H I M N P S T U W Y |
---|
Jump to: | C D F H I M N P S T U W Y |
---|