The rfc3339-timestamp Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The rfc3339-timestamp Reference Manual

This is the rfc3339-timestamp Reference Manual, version 0.1.3, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:31:22 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

RFC3339-timestamp is relaxed implementation of RFC3339 timestamps
using cl-yacc for parsing and a very simple timestamp class for
keeping track of fractions of a second and offset if you need it to
survive a decode/encode round trip.

A known limitation is that fractions of a second are limited to 10
digits. The parser implementation is quite relaxed about what it
passes. For instance a single space is allowed in place of a T for
date time seperation. Z or time offset is not needed at all and when
left out the parser will assume the timestamp is UTC+00:00. Fractions
are of course optional although that is also true per the RFC.

Another limitation is that dates prior to 1900-01-01 01:00:00 cannot
be represented because that is when universal time which is used
internally starts.

If you don't care for the relaxed mode of the parser you can make it
stricter by pushing :rfc3339-strict-parser to your *features* and
recompile. This will make the parser only accept true RFC3339
timestamps.

The other kind of timestamp that will be parsed if
:rfc3339-strict-parser is not in *features* is the specific format
used by xml-rpc. Which to my understanding is YYYYMMDDTHH:MM:SS.

Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 rfc3339-timestamp

Author

Peter Stiernström <peter@stiernstrom.se>

License

BSD

Description

A Common Lisp implementation of timestamps as defined by RFC3339

Version

0.1.3

Dependency

yacc

Source

rfc3339-timestamp.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

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


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 rfc3339-timestamp.asd

Location

rfc3339-timestamp.asd

Systems

rfc3339-timestamp (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 rfc3339-timestamp/src/package.lisp

Parent

rfc3339-timestamp (system)

Location

src/package.lisp

Packages

rfc3339


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 rfc3339-timestamp/src/timestamp.lisp

Dependency

src/package.lisp (file)

Parent

rfc3339-timestamp (system)

Location

src/timestamp.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.4 rfc3339-timestamp/src/parser.lisp

Dependency

src/timestamp.lisp (file)

Parent

rfc3339-timestamp (system)

Location

src/parser.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 rfc3339

Source

src/package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Special variables

Special Variable: *default-offset*
Package

rfc3339

Source

src/timestamp.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: make-timestamp &key UTC-TIME FRACTION OFFSET

When supplying utc-time you must make sure that you also supply a correct offset. For UTC+00:00 the offset is 0. For UTC-01:00 the offset would be -3600 and for UTC+01:00 the offset would be 3600.

Should you supply an offset or set *default-offset* to a value which does not translates to whole hours and seconds and thus can not be represented using a time offset of just hours and minutes we will break horribly so that you notice it.

Package

rfc3339

Source

src/timestamp.lisp (file)

Function: parse-string STRING
Package

rfc3339

Source

src/parser.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Generic functions

Generic Function: fraction-of OBJECT
Generic Function: (setf fraction-of) NEW-VALUE OBJECT
Package

rfc3339

Methods
Method: fraction-of (TIMESTAMP timestamp)
Method: (setf fraction-of) NEW-VALUE (TIMESTAMP timestamp)

Represents the fractions that can not be represented using whole seconds of universal time.

Source

src/timestamp.lisp (file)

Generic Function: local-date-string TIMESTAMP &optional STREAM
Package

rfc3339

Methods
Method: local-date-string (TIMESTAMP timestamp) &optional STREAM
Source

src/timestamp.lisp (file)

Generic Function: local-time-of TIMESTAMP
Package

rfc3339

Methods
Method: local-time-of (TIMESTAMP timestamp)
Source

src/timestamp.lisp (file)

Generic Function: local-time-string TIMESTAMP &optional STREAM
Package

rfc3339

Methods
Method: local-time-string (TIMESTAMP timestamp) &optional STREAM
Source

src/timestamp.lisp (file)

Generic Function: offset-of OBJECT
Generic Function: (setf offset-of) NEW-VALUE OBJECT
Package

rfc3339

Methods
Method: offset-of (TIMESTAMP timestamp)
Method: (setf offset-of) NEW-VALUE (TIMESTAMP timestamp)

Represent the offset in seconds relative to UTC. UTC+1 should be an offset of -3600

Source

src/timestamp.lisp (file)

Generic Function: rfc3339-timestamp TIMESTAMP &optional STREAM
Package

rfc3339

Methods
Method: rfc3339-timestamp (TIMESTAMP timestamp) &optional STREAM

This is the timestamp such as it should look according to
RFC3339. Unfortunately it doesn’t work for xml-rpc which uses someones ugly arbitrary idea of iso8601 and thus doesn’t allow for fractions or timezones.

Source

src/timestamp.lisp (file)

Generic Function: utc-date-string TIMESTAMP &optional STREAM
Package

rfc3339

Methods
Method: utc-date-string (TIMESTAMP timestamp) &optional STREAM
Source

src/timestamp.lisp (file)

Generic Function: utc-time-of OBJECT
Generic Function: (setf utc-time-of) NEW-VALUE OBJECT
Package

rfc3339

Methods
Method: utc-time-of (TIMESTAMP timestamp)
Method: (setf utc-time-of) NEW-VALUE (TIMESTAMP timestamp)

The timestamp as a universal time value with the
accuracy of on second. This should be in UTC and the offset should go in the offset slot.

Source

src/timestamp.lisp (file)

Generic Function: utc-time-string TIMESTAMP &optional STREAM
Package

rfc3339

Methods
Method: utc-time-string (TIMESTAMP timestamp) &optional STREAM
Source

src/timestamp.lisp (file)

Generic Function: xml-rpc-timestamp TIMESTAMP &optional STREAM
Package

rfc3339

Methods
Method: xml-rpc-timestamp (TIMESTAMP timestamp) &optional STREAM

This is the version of iso8601 that is used at xmlrpc.com/spec and that ruby seems to like. We use local-time because when using xml-rpc the time zone should be part of the api documentation rather than the timestamp which is a bit limiting...

Source

src/timestamp.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Conditions

Condition: malformed-timestamp ()
Package

rfc3339

Source

src/parser.lisp (file)

Direct superclasses

condition (condition)

Direct methods
Direct slots
Slot: fault-string
Initargs

:fault-string

Readers

fault-string-of (generic function)

Writers

(setf fault-string-of) (generic function)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.5 Classes

Class: timestamp ()
Package

rfc3339

Source

src/timestamp.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: utc-time

The timestamp as a universal time value with the
accuracy of on second. This should be in UTC and the offset should go in the offset slot.

Initargs

:utc-time

Readers

utc-time-of (generic function)

Writers

(setf utc-time-of) (generic function)

Slot: fraction

Represents the fractions that can not be represented using whole seconds of universal time.

Initargs

:fraction

Initform

0

Readers

fraction-of (generic function)

Writers

(setf fraction-of) (generic function)

Slot: offset

Represent the offset in seconds relative to UTC. UTC+1 should be an offset of -3600

Initargs

:offset

Readers

offset-of (generic function)

Writers

(setf offset-of) (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *rfc3339-parser*
Package

rfc3339

Source

src/parser.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: collapse &rest YS
Package

rfc3339

Source

src/parser.lisp (file)

Function: collapse-butfirst &rest PARTS
Package

rfc3339

Source

src/parser.lisp (file)

Function: create-timestamp &rest PARTS
Package

rfc3339

Source

src/parser.lisp (file)

Function: date-string TIME &optional STREAM
Package

rfc3339

Source

src/timestamp.lisp (file)

Function: flatten TREE
Package

rfc3339

Source

src/parser.lisp (file)

Function: offset-seconds &rest VALUES
Package

rfc3339

Source

src/parser.lisp (file)

Function: rfc3339-lexer STRING
Package

rfc3339

Source

src/parser.lisp (file)

Function: the-values &rest VALUES
Package

rfc3339

Source

src/parser.lisp (file)

Function: time-string TIME &optional STREAM
Package

rfc3339

Source

src/timestamp.lisp (file)

Function: unseparate &rest VALUES
Package

rfc3339

Source

src/parser.lisp (file)

Function: unseparate-butlast &rest VALUES
Package

rfc3339

Source

src/parser.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Generic functions

Generic Function: fault-string-of CONDITION
Generic Function: (setf fault-string-of) NEW-VALUE CONDITION
Package

rfc3339

Methods
Method: fault-string-of (CONDITION malformed-timestamp)
Method: (setf fault-string-of) NEW-VALUE (CONDITION malformed-timestamp)
Source

src/parser.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   R  
Index Entry  Section

F
File, Lisp, rfc3339-timestamp.asd: The rfc3339-timestamp<dot>asd file
File, Lisp, rfc3339-timestamp/src/package.lisp: The rfc3339-timestamp/src/package<dot>lisp file
File, Lisp, rfc3339-timestamp/src/parser.lisp: The rfc3339-timestamp/src/parser<dot>lisp file
File, Lisp, rfc3339-timestamp/src/timestamp.lisp: The rfc3339-timestamp/src/timestamp<dot>lisp file

L
Lisp File, rfc3339-timestamp.asd: The rfc3339-timestamp<dot>asd file
Lisp File, rfc3339-timestamp/src/package.lisp: The rfc3339-timestamp/src/package<dot>lisp file
Lisp File, rfc3339-timestamp/src/parser.lisp: The rfc3339-timestamp/src/parser<dot>lisp file
Lisp File, rfc3339-timestamp/src/timestamp.lisp: The rfc3339-timestamp/src/timestamp<dot>lisp file

R
rfc3339-timestamp.asd: The rfc3339-timestamp<dot>asd file
rfc3339-timestamp/src/package.lisp: The rfc3339-timestamp/src/package<dot>lisp file
rfc3339-timestamp/src/parser.lisp: The rfc3339-timestamp/src/parser<dot>lisp file
rfc3339-timestamp/src/timestamp.lisp: The rfc3339-timestamp/src/timestamp<dot>lisp file

Jump to:   F   L   R  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
C   D   F   G   L   M   O   P   R   T   U   X  
Index Entry  Section

(
(setf fault-string-of): Internal generic functions
(setf fault-string-of): Internal generic functions
(setf fraction-of): Exported generic functions
(setf fraction-of): Exported generic functions
(setf offset-of): Exported generic functions
(setf offset-of): Exported generic functions
(setf utc-time-of): Exported generic functions
(setf utc-time-of): Exported generic functions

C
collapse: Internal functions
collapse-butfirst: Internal functions
create-timestamp: Internal functions

D
date-string: Internal functions

F
fault-string-of: Internal generic functions
fault-string-of: Internal generic functions
flatten: Internal functions
fraction-of: Exported generic functions
fraction-of: Exported generic functions
Function, collapse: Internal functions
Function, collapse-butfirst: Internal functions
Function, create-timestamp: Internal functions
Function, date-string: Internal functions
Function, flatten: Internal functions
Function, make-timestamp: Exported functions
Function, offset-seconds: Internal functions
Function, parse-string: Exported functions
Function, rfc3339-lexer: Internal functions
Function, the-values: Internal functions
Function, time-string: Internal functions
Function, unseparate: Internal functions
Function, unseparate-butlast: Internal functions

G
Generic Function, (setf fault-string-of): Internal generic functions
Generic Function, (setf fraction-of): Exported generic functions
Generic Function, (setf offset-of): Exported generic functions
Generic Function, (setf utc-time-of): Exported generic functions
Generic Function, fault-string-of: Internal generic functions
Generic Function, fraction-of: Exported generic functions
Generic Function, local-date-string: Exported generic functions
Generic Function, local-time-of: Exported generic functions
Generic Function, local-time-string: Exported generic functions
Generic Function, offset-of: Exported generic functions
Generic Function, rfc3339-timestamp: Exported generic functions
Generic Function, utc-date-string: Exported generic functions
Generic Function, utc-time-of: Exported generic functions
Generic Function, utc-time-string: Exported generic functions
Generic Function, xml-rpc-timestamp: Exported generic functions

L
local-date-string: Exported generic functions
local-date-string: Exported generic functions
local-time-of: Exported generic functions
local-time-of: Exported generic functions
local-time-string: Exported generic functions
local-time-string: Exported generic functions

M
make-timestamp: Exported functions
Method, (setf fault-string-of): Internal generic functions
Method, (setf fraction-of): Exported generic functions
Method, (setf offset-of): Exported generic functions
Method, (setf utc-time-of): Exported generic functions
Method, fault-string-of: Internal generic functions
Method, fraction-of: Exported generic functions
Method, local-date-string: Exported generic functions
Method, local-time-of: Exported generic functions
Method, local-time-string: Exported generic functions
Method, offset-of: Exported generic functions
Method, rfc3339-timestamp: Exported generic functions
Method, utc-date-string: Exported generic functions
Method, utc-time-of: Exported generic functions
Method, utc-time-string: Exported generic functions
Method, xml-rpc-timestamp: Exported generic functions

O
offset-of: Exported generic functions
offset-of: Exported generic functions
offset-seconds: Internal functions

P
parse-string: Exported functions

R
rfc3339-lexer: Internal functions
rfc3339-timestamp: Exported generic functions
rfc3339-timestamp: Exported generic functions

T
the-values: Internal functions
time-string: Internal functions

U
unseparate: Internal functions
unseparate-butlast: Internal functions
utc-date-string: Exported generic functions
utc-date-string: Exported generic functions
utc-time-of: Exported generic functions
utc-time-of: Exported generic functions
utc-time-string: Exported generic functions
utc-time-string: Exported generic functions

X
xml-rpc-timestamp: Exported generic functions
xml-rpc-timestamp: Exported generic functions

Jump to:   (  
C   D   F   G   L   M   O   P   R   T   U   X  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
F   O   S   U  
Index Entry  Section

*
*default-offset*: Exported special variables
*rfc3339-parser*: Internal special variables

F
fault-string: Exported conditions
fraction: Exported classes

O
offset: Exported classes

S
Slot, fault-string: Exported conditions
Slot, fraction: Exported classes
Slot, offset: Exported classes
Slot, utc-time: Exported classes
Special Variable, *default-offset*: Exported special variables
Special Variable, *rfc3339-parser*: Internal special variables

U
utc-time: Exported classes

Jump to:   *  
F   O   S   U  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   M   P   R   S   T  
Index Entry  Section

C
Class, timestamp: Exported classes
Condition, malformed-timestamp: Exported conditions

M
malformed-timestamp: Exported conditions

P
Package, rfc3339: The rfc3339 package

R
rfc3339: The rfc3339 package
rfc3339-timestamp: The rfc3339-timestamp system

S
System, rfc3339-timestamp: The rfc3339-timestamp system

T
timestamp: Exported classes

Jump to:   C   M   P   R   S   T