The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Renard::API::MuPDF::mutool::DateObject - An object to store the date

VERSION

version 0.006

EXTENDS

ATTRIBUTES

string

A PDF date string in string which are in the form:

D:YYYYMMDDHHmmSSOHH'mm'

data

A HashRef in the form

Dict[
  year   => Str,   # YYYY
  month  => Str,   # MM: 01-12
  day    => Str,   # DD: 01-31

  hour   => Str,   # HH: 00-23
  minute => Str,   # mm: 00-59
  second => Str,   # SS: 00-59

  tz     => Dict[
    offset => Str, # O: /[-+Z]/
    hour   => Str, # HH': 00-59
    minute => Str, # mm': 00-59
  ],
]

METHODS

as_DateTime

method as_DateTime() :ReturnType(InstanceOf['DateTime'])

Returns a DateTime representation of the date.

stringify

method stringify()

Returns a Str representation of the date.

This follows the ISO 8601 format of

YYYY-MM-DDThh:mm:ss±hh:mm

which includes the timezone (either as an offset ±hh:mm or as Z for UTC) and using a T separator for the date and time.

AUTHOR

Project Renard

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Project Renard.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.