The cl-strftime Reference Manual

This is the cl-strftime Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 15:45:15 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-strftime

Common Lisp compiler for the strftime language.

Author

Paul M. Rodriguez <>

License

MIT

Dependencies
  • alexandria (system).
  • serapeum (system).
  • cl-ppcre (system).
  • local-time (system).
Source

cl-strftime.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-strftime/cl-strftime.asd

Source

cl-strftime.asd.

Parent Component

cl-strftime (system).

ASDF Systems

cl-strftime.


3.1.2 cl-strftime/package.lisp

Source

cl-strftime.asd.

Parent Component

cl-strftime (system).

Packages

cl-strftime.


3.1.3 cl-strftime/time.lisp

Dependency

package.lisp (file).

Source

cl-strftime.asd.

Parent Component

cl-strftime (system).

Internals

3.1.4 cl-strftime/directives.lisp

Dependency

time.lisp (file).

Source

cl-strftime.asd.

Parent Component

cl-strftime (system).

Internals

3.1.5 cl-strftime/named-format.lisp

Dependency

directives.lisp (file).

Source

cl-strftime.asd.

Parent Component

cl-strftime (system).

Internals

3.1.6 cl-strftime/math.lisp

Dependency

named-format.lisp (file).

Source

cl-strftime.asd.

Parent Component

cl-strftime (system).

Internals

3.1.7 cl-strftime/cl-strftime.lisp

Dependency

math.lisp (file).

Source

cl-strftime.asd.

Parent Component

cl-strftime (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-strftime

Source

package.lisp.

Use List
  • alexandria.
  • common-lisp.
  • local-time.
  • serapeum.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Compiler macros

Compiler Macro: format-time (stream format &optional time tz)
Package

cl-strftime.

Source

cl-strftime.lisp.


5.1.2 Ordinary functions

Function: format-time (stream format &optional time tz)

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

Package

cl-strftime.

Source

cl-strftime.lisp.

Function: make-time-formatter (format)
Package

cl-strftime.

Source

cl-strftime.lisp.


5.2 Internals


5.2.1 Constants

Constant: +storage-for-deflex-var-am/pm-hours+

Hours ante/post meridian.

Package

cl-strftime.

Source

time.lisp.

Constant: +storage-for-deflex-var-century-years+

Years in a century.

Package

cl-strftime.

Source

time.lisp.

Constant: +storage-for-deflex-var-day-hours+

Hours in a day.

Package

cl-strftime.

Source

time.lisp.

Constant: +storage-for-deflex-var-gmt+
Package

cl-strftime.

Source

time.lisp.

Constant: +storage-for-deflex-var-gregorian-cycle+

Length of a cycle in the Gregorian calendar.

Package

cl-strftime.

Source

time.lisp.

Constant: +storage-for-deflex-var-hour-seconds+

Seconds in an hour.

Package

cl-strftime.

Source

time.lisp.

Constant: +storage-for-deflex-var-leap-year-days+

Days in a leap year.

Package

cl-strftime.

Source

time.lisp.

Constant: +storage-for-deflex-var-month-days+

Maximum number of days in a month.

Package

cl-strftime.

Source

time.lisp.

Constant: +storage-for-deflex-var-utc+
Package

cl-strftime.

Source

time.lisp.

Constant: +storage-for-deflex-var-week-days+

Days in a week.

Package

cl-strftime.

Source

time.lisp.

Constant: +storage-for-deflex-var-year-days+

Days in a (non-leap) year.

Package

cl-strftime.

Source

time.lisp.

Constant: +storage-for-deflex-var-year-months+

Months in a year.

Package

cl-strftime.

Source

time.lisp.

Constant: +storage-for-deflex-var-zulu+
Package

cl-strftime.

Source

time.lisp.


5.2.2 Special variables

Special Variable: *compiled-time-formats*
Package

cl-strftime.

Source

cl-strftime.lisp.

Special Variable: *default-width*
Package

cl-strftime.

Source

cl-strftime.lisp.


5.2.3 Symbol macros

Symbol Macro: am/pm-hours
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: century-years
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: day-hours
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: gmt
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: gregorian-cycle
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: hour-seconds
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: iso-long-year-table
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: leap-year-days
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: month-days
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: month-lengths
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: month-offsets
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: months
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: named-time-formats
Package

cl-strftime.

Source

named-format.lisp.

Symbol Macro: short-months
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: short-weekdays
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: time-directives
Package

cl-strftime.

Source

directives.lisp.

Symbol Macro: utc
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: week-days
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: weekdays
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: year-days
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: year-months
Package

cl-strftime.

Source

time.lisp.

Symbol Macro: zulu
Package

cl-strftime.

Source

time.lisp.


5.2.4 Ordinary functions

Function: am/pm (time)
Package

cl-strftime.

Source

math.lisp.

Function: am/pm-lowercase (time)
Package

cl-strftime.

Source

math.lisp.

Function: century-of-year (time)
Package

cl-strftime.

Source

math.lisp.

Function: compile-directive (flag width directive)
Package

cl-strftime.

Source

cl-strftime.lisp.

Function: compile-flag (flag width action)
Package

cl-strftime.

Source

cl-strftime.lisp.

Function: compile-flag-char (flag-char width action)
Package

cl-strftime.

Source

cl-strftime.lisp.

Function: compile-formatter (string)
Package

cl-strftime.

Source

cl-strftime.lisp.

Function: compile-parsed-format (format)
Package

cl-strftime.

Source

cl-strftime.lisp.

Function: day-of-year-number (y m d)
Package

cl-strftime.

Source

math.lisp.

Function: expand-tz (tz)
Package

cl-strftime.

Source

cl-strftime.lisp.

Function: extract-time-zone-abbrev (time)
Package

cl-strftime.

Source

math.lisp.

Function: find-directive (char &key noerror)
Package

cl-strftime.

Source

directives.lisp.

Function: flatten! (list)
Package

cl-strftime.

Source

cl-strftime.lisp.

Function: iso-8601-week-number (time)
Package

cl-strftime.

Source

math.lisp.

Function: iso-8601-year (time)
Package

cl-strftime.

Source

math.lisp.

Function: iso-8601-year-of-century (time)
Package

cl-strftime.

Source

math.lisp.

Function: iso-day-of-week (time)

Return the day of week from 1–7, where 1 is Monday.

Package

cl-strftime.

Source

math.lisp.

Function: iso-long-year? (year)
Package

cl-strftime.

Source

time.lisp.

Function: iso-week+year (time)
Package

cl-strftime.

Source

math.lisp.

Function: last-week (year)
Package

cl-strftime.

Source

time.lisp.

Function: leap-year? (y)
Package

cl-strftime.

Source

math.lisp.

Function: make-time-formatter-1 (format force-gmt)
Package

cl-strftime.

Source

cl-strftime.lisp.

Function: monday-week-number (time)
Package

cl-strftime.

Source

math.lisp.

Function: month-name (time)
Package

cl-strftime.

Source

time.lisp.

Function: month-offset (m)
Package

cl-strftime.

Source

time.lisp.

Function: named-time-format (name &optional gmt?)
Package

cl-strftime.

Source

named-format.lisp.

Function: o-clock (time)
Package

cl-strftime.

Source

math.lisp.

Function: parse-format-string (string)
Package

cl-strftime.

Source

cl-strftime.lisp.

Function: short-month-name (time)
Package

cl-strftime.

Source

time.lisp.

Function: short-weekday-name (time)
Package

cl-strftime.

Source

time.lisp.

Function: sunday-week-number (time)
Package

cl-strftime.

Source

math.lisp.

Function: time-zone-name (time &optional nato)
Package

cl-strftime.

Source

math.lisp.

Function: time-zone-offset (time)
Package

cl-strftime.

Source

math.lisp.

Function: time-zone-offset-with-colon (time)
Package

cl-strftime.

Source

math.lisp.

Function: timestamp-day-of-year (time)

The day of year of TIME, counting from 1.

Package

cl-strftime.

Source

math.lisp.

Function: week-number (time day-of-week)
Package

cl-strftime.

Source

math.lisp.

Function: weekday-name (time)
Package

cl-strftime.

Source

time.lisp.

Function: year-of-century (time)
Package

cl-strftime.

Source

math.lisp.


5.2.5 Types

Type: day ()

A day of the month.

Package

cl-strftime.

Source

time.lisp.

Type: directive-action ()
Package

cl-strftime.

Source

directives.lisp.

Type: flag ()
Package

cl-strftime.

Source

directives.lisp.

Type: hour ()

An hour.

Package

cl-strftime.

Source

time.lisp.

Type: iso-week ()
Package

cl-strftime.

Source

time.lisp.

Type: minute ()

A minute.

Package

cl-strftime.

Source

time.lisp.

Type: month ()

A month.

Package

cl-strftime.

Source

time.lisp.

Type: second ()

A minute.

Package

cl-strftime.

Source

time.lisp.

Type: time ()
Package

cl-strftime.

Source

time.lisp.

Type: time-zone ()
Package

cl-strftime.

Source

time.lisp.

Type: universal-time ()
Package

cl-strftime.

Source

time.lisp.

Type: week ()

A week of the year.

Package

cl-strftime.

Source

time.lisp.

Type: weekday ()

A day of the week.

Package

cl-strftime.

Source

time.lisp.

Type: writer ()
Package

cl-strftime.

Source

cl-strftime.lisp.

Type: year ()

A year.

Package

cl-strftime.

Source

time.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   A   C   D   E   F   I   L   M   N   O   P   S   T   W   Y  
Index Entry  Section

A
am/pm: Private ordinary functions
am/pm-lowercase: Private ordinary functions

C
century-of-year: Private ordinary functions
compile-directive: Private ordinary functions
compile-flag: Private ordinary functions
compile-flag-char: Private ordinary functions
compile-formatter: Private ordinary functions
compile-parsed-format: Private ordinary functions
Compiler Macro, format-time: Public compiler macros

D
day-of-year-number: Private ordinary functions

E
expand-tz: Private ordinary functions
extract-time-zone-abbrev: Private ordinary functions

F
find-directive: Private ordinary functions
flatten!: Private ordinary functions
format-time: Public compiler macros
format-time: Public ordinary functions
Function, am/pm: Private ordinary functions
Function, am/pm-lowercase: Private ordinary functions
Function, century-of-year: Private ordinary functions
Function, compile-directive: Private ordinary functions
Function, compile-flag: Private ordinary functions
Function, compile-flag-char: Private ordinary functions
Function, compile-formatter: Private ordinary functions
Function, compile-parsed-format: Private ordinary functions
Function, day-of-year-number: Private ordinary functions
Function, expand-tz: Private ordinary functions
Function, extract-time-zone-abbrev: Private ordinary functions
Function, find-directive: Private ordinary functions
Function, flatten!: Private ordinary functions
Function, format-time: Public ordinary functions
Function, iso-8601-week-number: Private ordinary functions
Function, iso-8601-year: Private ordinary functions
Function, iso-8601-year-of-century: Private ordinary functions
Function, iso-day-of-week: Private ordinary functions
Function, iso-long-year?: Private ordinary functions
Function, iso-week+year: Private ordinary functions
Function, last-week: Private ordinary functions
Function, leap-year?: Private ordinary functions
Function, make-time-formatter: Public ordinary functions
Function, make-time-formatter-1: Private ordinary functions
Function, monday-week-number: Private ordinary functions
Function, month-name: Private ordinary functions
Function, month-offset: Private ordinary functions
Function, named-time-format: Private ordinary functions
Function, o-clock: Private ordinary functions
Function, parse-format-string: Private ordinary functions
Function, short-month-name: Private ordinary functions
Function, short-weekday-name: Private ordinary functions
Function, sunday-week-number: Private ordinary functions
Function, time-zone-name: Private ordinary functions
Function, time-zone-offset: Private ordinary functions
Function, time-zone-offset-with-colon: Private ordinary functions
Function, timestamp-day-of-year: Private ordinary functions
Function, week-number: Private ordinary functions
Function, weekday-name: Private ordinary functions
Function, year-of-century: Private ordinary functions

I
iso-8601-week-number: Private ordinary functions
iso-8601-year: Private ordinary functions
iso-8601-year-of-century: Private ordinary functions
iso-day-of-week: Private ordinary functions
iso-long-year?: Private ordinary functions
iso-week+year: Private ordinary functions

L
last-week: Private ordinary functions
leap-year?: Private ordinary functions

M
make-time-formatter: Public ordinary functions
make-time-formatter-1: Private ordinary functions
monday-week-number: Private ordinary functions
month-name: Private ordinary functions
month-offset: Private ordinary functions

N
named-time-format: Private ordinary functions

O
o-clock: Private ordinary functions

P
parse-format-string: Private ordinary functions

S
short-month-name: Private ordinary functions
short-weekday-name: Private ordinary functions
sunday-week-number: Private ordinary functions

T
time-zone-name: Private ordinary functions
time-zone-offset: Private ordinary functions
time-zone-offset-with-colon: Private ordinary functions
timestamp-day-of-year: Private ordinary functions

W
week-number: Private ordinary functions
weekday-name: Private ordinary functions

Y
year-of-century: Private ordinary functions


A.3 Variables

Jump to:   *   +  
A   C   D   G   H   I   L   M   N   S   T   U   W   Y   Z  
Index Entry  Section

*
*compiled-time-formats*: Private special variables
*default-width*: Private special variables

+
+storage-for-deflex-var-am/pm-hours+: Private constants
+storage-for-deflex-var-century-years+: Private constants
+storage-for-deflex-var-day-hours+: Private constants
+storage-for-deflex-var-gmt+: Private constants
+storage-for-deflex-var-gregorian-cycle+: Private constants
+storage-for-deflex-var-hour-seconds+: Private constants
+storage-for-deflex-var-leap-year-days+: Private constants
+storage-for-deflex-var-month-days+: Private constants
+storage-for-deflex-var-utc+: Private constants
+storage-for-deflex-var-week-days+: Private constants
+storage-for-deflex-var-year-days+: Private constants
+storage-for-deflex-var-year-months+: Private constants
+storage-for-deflex-var-zulu+: Private constants

A
am/pm-hours: Private symbol macros

C
century-years: Private symbol macros
Constant, +storage-for-deflex-var-am/pm-hours+: Private constants
Constant, +storage-for-deflex-var-century-years+: Private constants
Constant, +storage-for-deflex-var-day-hours+: Private constants
Constant, +storage-for-deflex-var-gmt+: Private constants
Constant, +storage-for-deflex-var-gregorian-cycle+: Private constants
Constant, +storage-for-deflex-var-hour-seconds+: Private constants
Constant, +storage-for-deflex-var-leap-year-days+: Private constants
Constant, +storage-for-deflex-var-month-days+: Private constants
Constant, +storage-for-deflex-var-utc+: Private constants
Constant, +storage-for-deflex-var-week-days+: Private constants
Constant, +storage-for-deflex-var-year-days+: Private constants
Constant, +storage-for-deflex-var-year-months+: Private constants
Constant, +storage-for-deflex-var-zulu+: Private constants

D
day-hours: Private symbol macros

G
gmt: Private symbol macros
gregorian-cycle: Private symbol macros

H
hour-seconds: Private symbol macros

I
iso-long-year-table: Private symbol macros

L
leap-year-days: Private symbol macros

M
month-days: Private symbol macros
month-lengths: Private symbol macros
month-offsets: Private symbol macros
months: Private symbol macros

N
named-time-formats: Private symbol macros

S
short-months: Private symbol macros
short-weekdays: Private symbol macros
Special Variable, *compiled-time-formats*: Private special variables
Special Variable, *default-width*: Private special variables
Symbol Macro, am/pm-hours: Private symbol macros
Symbol Macro, century-years: Private symbol macros
Symbol Macro, day-hours: Private symbol macros
Symbol Macro, gmt: Private symbol macros
Symbol Macro, gregorian-cycle: Private symbol macros
Symbol Macro, hour-seconds: Private symbol macros
Symbol Macro, iso-long-year-table: Private symbol macros
Symbol Macro, leap-year-days: Private symbol macros
Symbol Macro, month-days: Private symbol macros
Symbol Macro, month-lengths: Private symbol macros
Symbol Macro, month-offsets: Private symbol macros
Symbol Macro, months: Private symbol macros
Symbol Macro, named-time-formats: Private symbol macros
Symbol Macro, short-months: Private symbol macros
Symbol Macro, short-weekdays: Private symbol macros
Symbol Macro, time-directives: Private symbol macros
Symbol Macro, utc: Private symbol macros
Symbol Macro, week-days: Private symbol macros
Symbol Macro, weekdays: Private symbol macros
Symbol Macro, year-days: Private symbol macros
Symbol Macro, year-months: Private symbol macros
Symbol Macro, zulu: Private symbol macros

T
time-directives: Private symbol macros

U
utc: Private symbol macros

W
week-days: Private symbol macros
weekdays: Private symbol macros

Y
year-days: Private symbol macros
year-months: Private symbol macros

Z
zulu: Private symbol macros


A.4 Data types

Jump to:   C   D   F   H   I   M   N   P   S   T   U   W   Y  
Index Entry  Section

C
cl-strftime: The cl-strftime system
cl-strftime: The cl-strftime package
cl-strftime.asd: The cl-strftime/cl-strftime․asd file
cl-strftime.lisp: The cl-strftime/cl-strftime․lisp file

D
day: Private types
directive-action: Private types
directives.lisp: The cl-strftime/directives․lisp file

F
File, cl-strftime.asd: The cl-strftime/cl-strftime․asd file
File, cl-strftime.lisp: The cl-strftime/cl-strftime․lisp file
File, directives.lisp: The cl-strftime/directives․lisp file
File, math.lisp: The cl-strftime/math․lisp file
File, named-format.lisp: The cl-strftime/named-format․lisp file
File, package.lisp: The cl-strftime/package․lisp file
File, time.lisp: The cl-strftime/time․lisp file
flag: Private types

H
hour: Private types

I
iso-week: Private types

M
math.lisp: The cl-strftime/math․lisp file
minute: Private types
month: Private types

N
named-format.lisp: The cl-strftime/named-format․lisp file

P
Package, cl-strftime: The cl-strftime package
package.lisp: The cl-strftime/package․lisp file

S
second: Private types
System, cl-strftime: The cl-strftime system

T
time: Private types
time-zone: Private types
time.lisp: The cl-strftime/time․lisp file
Type, day: Private types
Type, directive-action: Private types
Type, flag: Private types
Type, hour: Private types
Type, iso-week: Private types
Type, minute: Private types
Type, month: Private types
Type, second: Private types
Type, time: Private types
Type, time-zone: Private types
Type, universal-time: Private types
Type, week: Private types
Type, weekday: Private types
Type, writer: Private types
Type, year: Private types

U
universal-time: Private types

W
week: Private types
weekday: Private types
writer: Private types

Y
year: Private types