class PDF::Date

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

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.cr

Class Method Summary

Instance Method Summary

Instance methods inherited from module PDF::Renderable

render_to_pdf(io : IO) : IO render_to_pdf

Class Method Detail

def self.format(time : Time) #

format a crystal Time to string


[View source]

Instance Method Detail

def render_to_pdf(io : IO) : IO #
Description copied from module PDF::Renderable

render your data into a pdf file , and return the rendered IO


[View source]