Overview

Namespaces

  • Apptus
    • ESales
      • Connector
        • Report
        • Time
    • Util
      • Cache
  • PHP

Classes

  • CalendarDate
  • Duration
  • IsoDate
  • IsoDateTime
  • Month
  • OrdinalDate
  • Time
  • TimeInterval
  • TimePoint
  • Unit
  • WeekDate
  • Weekday
  • Overview
  • Namespace
  • Class
  • Tree

Class IsoDateTime

A date and time on the ISO 8601 format.

Namespace: Apptus\ESales\Connector\Time
Located at Connector/Time/IsoDateTime.php
Methods summary
public static Apptus\ESales\Connector\Time\IsoDateTime
# parse( string $input )

Parses a date and time specification and returns a date-time object.

Parses a date and time specification and returns a date-time object.

Parameters

$input
input string. May not be null.

Returns

Apptus\ESales\Connector\Time\IsoDateTime
An IsoDateTime object.

Throws

InvalidArgumentException
if the date and time cannot be parsed.
public static Apptus\ESales\Connector\Time\IsoDateTime
# parseInContext( string $input, Apptus\ESales\Connector\Time\IsoDateTime $start )

Parses a date and time specification and returns a date-time object.

Parses a date and time specification and returns a date-time object.

The date may omit the larger units, which in such case will be inherited from the start date-time supplied. Note that the start date then must be defined in the same date format as the input string.

Parameters

$input
input string. May not be null.
$start
IsoDateTime object to inherit from.

Returns

Apptus\ESales\Connector\Time\IsoDateTime
An IsoDateTime object.

Throws

InvalidArgumentException
if the date and time cannot be parsed.
public
# __construct( Apptus\ESales\Connector\Time\IsoDate $date, Apptus\ESales\Connector\Time\Time $time = null )

Creates a date-object with the specified date and time.

Creates a date-object with the specified date and time.

Parameters

$date
date. May not be null.
$time
time. May be null.
public Apptus\ESales\Connector\Time\IsoDate
# date( )

Returns the date. Never returns null.

Returns the date. Never returns null.

Returns

Apptus\ESales\Connector\Time\IsoDate
public Apptus\ESales\Connector\Time\Time|null
# time( )

Returns the time. Returns null if omitted at creation.

Returns the time. Returns null if omitted at creation.

Returns

Apptus\ESales\Connector\Time\Time|null
public Apptus\ESales\Connector\Time\TimePoint
# toTimePoint( DateTimeZone $tz )

Returns a point in time represented by this date-time object.

Returns a point in time represented by this date-time object.

If the date or time lacks precision, or if the time is omitted, then the smallest valid point in time is used.

Parameters

$tz
timezone.

Returns

Apptus\ESales\Connector\Time\TimePoint
A point in time.
public string
# __toString( )

Returns this date and time in ISO 8601 format: <date>T<time>.

Returns this date and time in ISO 8601 format: <date>T<time>.

Returns

string
public boolean
# equals( mixed $o )

Parameters

$o

Returns

boolean
Apptus ESales Connector PHP API documentation generated by ApiGen