SetaPDF_Core_DataStructure_Date Data structure class for date objects

File: /SetaPDF/Core/DataStructure/Date.php

Class hierarchy

Implements

Summary

Properties

$_string

Format: (D:YYYYMMDDHHmmSSOHH'mm)


Static Methods

stringToDateTime()

static public DateTime SetaPDF_Core_DataStructure_Date::stringToDateTime ( string $string )

Converts an PDF date time string into a DateTime object.

Parameters
$string : string
 
Exceptions

Throws OutOfRangeException


Methods

__construct()

public SetaPDF_Core_DataStructure_Date::__construct ( [ string|DateTime|SetaPDF_Core_Type_String $string = null ] )

The constructor.

The $string parameter can be of various types:

  • If a SetaPDF_Core_Type_String object is passed, it will be used as the date value.
  • If a DateTime instance is passed, it will be forwarded to the setByDateTime() method.
  • If a simple string is passed, it will be passed to create a new DateTime instance which is forward to the setByDateTime() method then.
Parameters
$string : string|DateTime|SetaPDF_Core_Type_String
 

getAsDateTime()

public DateTime SetaPDF_Core_DataStructure_Date::getAsDateTime ( void )

Get the PDF date as a DateTime object.

getValue()

public SetaPDF_Core_Type_String SetaPDF_Core_DataStructure_Date::getValue ( void )

Get the PDF string object.

See

setByDateTime()

public void SetaPDF_Core_DataStructure_Date::setByDateTime ( DateTime $dateTime )

Set the date by a DateTime object.

Parameters
$dateTime : DateTime
 

toPhp()

public void SetaPDF_Core_DataStructure_Date::toPhp ( void )

Get the date as a PHP string.

See