class PDF::Date
- PDF::Date
- Reference
- Object
Overview
PDF defines a standard date format, which closely follows that of the international standard ASN.1 (Abstract Syntax Notation One), defined in ISO/IEC 8824 (see the Bibliography). A date is a string of the form
(D:YYYYMMDDHHmmSSOHH'mm')
where
YYYY
is the yearMM
is the monthDD
is the day (01–31)HH
is the hour (00–23)mm
is the minute (00–59)SS
is the second (00–59)O
is the relationship of local time to Universal Time (UT), denoted by one of the characters +, −, or Z (see below)HH
followed by ' is the absolute value of the offset from UT in hours (00–23)mm
followed by ' is the absolute value of the offset from UT in minutes (00–59)
The quotation mark character (') after HH and mm is part of the syntax. All fields after the year are optional. (The prefix D:, although also optional, is strongly recommended.)
The default values for MM and DD are both 01; all other numerical fields default to zero values.
A plus sign (+) as the value of the O field signifies that local time is later than UT, a minus sign (−) that local time is earlier than UT, and the letter Z that local time is equal to UT. If no UT information is specified, the relationship of the specified time to UT is considered to be unknown. Whether or not the time zone is known, the rest of the date should be specified in local time.
For example, December 23, 1998, at 7:52 PM, U.S. Pacific Standard Time, is represented by the string
D:199812231952−08'00'
Included Modules
Defined in:
pdf/data/date.crClass Method Summary
-
.format(time : Time)
format a crystal
Time
to string
Instance Method Summary
-
#render_to_pdf(io : IO) : IO
render your data into a pdf file , and return the rendered IO
Instance methods inherited from module PDF::Renderable
render_to_pdf(io : IO) : IO
render_to_pdf
Class Method Detail
Instance Method Detail
render your data into a pdf file , and return the rendered IO