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 Time

A time of day in ISO 8601 format.

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

Parses a time of day in ISO 8601 format and returns it as a Time object.

Parses a time of day in ISO 8601 format and returns it as a Time object.

If parsing fails, this method throws an exception.

Parameters

$input
input string.

Returns

Apptus\ESales\Connector\Time\Time
A Time object.

Throws

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

Parses a time of day in ISO 8601 format and returns it as a Time object.

Parses a time of day in ISO 8601 format and returns it as a Time object.

If parsing fails, this method throws an exception.

The time may omit the larger units, which in such case will be inherited from the start time supplied.

Parameters

$input
input string.
$start
start time.

Returns

Apptus\ESales\Connector\Time\Time
A Time object.

Throws

InvalidArgumentException
if the input cannot be parsed.
public
# __construct( integer $hour, integer|null $minute, integer|null $second, integer|null $offset )

Creates a time with the specified hour, minute and second.

Creates a time with the specified hour, minute and second.

Minute and second may be omitted for less precision.

The offset specifies difference from UTC in number of minutes. The offset may be positive, negative or 0. If the offset is null, then according to ISO 8601 should use local time.

Parameters

$hour
hour. May not be null.
$minute
minute. May be null.
$second
second. May be null.
$offset
offset from UTC in minutes. May be null.

Throws

InvalidArgumentException
public integer
# hour( )

Returns the hour. Never returns null.

Returns the hour. Never returns null.

Returns

integer
public integer|null
# minute( )

Returns the minute. May return null.

Returns the minute. May return null.

Returns

integer|null
public integer|null
# second( )

Returns the second. May return null.

Returns the second. May return null.

Returns

integer|null
public integer|null
# offset( )

Returns the offset from UTC in minutes. May return null.

Returns the offset from UTC in minutes. May return null.

Returns

integer|null
public
# __toString( )
public
# equals( $o )
Apptus ESales Connector PHP API documentation generated by ApiGen