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 CalendarDate

A date on the form YYYY-MM-DD according to the Gregorian calendar.

This class describes a calendar date as defined by ISO 8601.

Apptus\ESales\Connector\Time\IsoDate
Extended by Apptus\ESales\Connector\Time\CalendarDate
Namespace: Apptus\ESales\Connector\Time
Located at Connector/Time/CalendarDate.php
Methods summary
public
# __construct( integer $year, integer|null $month, integer|null $day )

Creates a new calendar date with the specified year, month and day.

Creates a new calendar date with the specified year, month and day.

The day or the day and month may be omitted for less precision.

Parameters

$year
year, e.g. 2001.
$month
month, e.g. Month::JANUARY, or null.
$day
day in month, e.g. 4.

Throws

InvalidArgumentException
public integer
# year( )

Returns the year. Never returns null.

Returns the year. Never returns null.

Returns

integer
public integer|null
# month( )

Returns the month, if specified at creation. Otherwise returns null.

Returns the month, if specified at creation. Otherwise returns null.

Returns

integer|null
public integer|null
# day( )

Returns the day in month, if specified at creation. Otherwise returns null.

Returns the day in month, if specified at creation. Otherwise returns null.

Returns

integer|null
public string
# __toString( )

Returns a string with an ISO 8601 representation of this date.

Returns a string with an ISO 8601 representation of this date.

Returns

string
An ISO 8601 representation of this date.
public Apptus\ESales\Connector\Time\TimePoint
# toTimePoint( Apptus\ESales\Connector\Time\Time $t, DateTimeZone $tz )

Returns a point in time represented by this date and a supplied time of day.

Returns a point in time represented by this date and a supplied time of day.

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

Parameters

$t
time of day. May be null.
$tz
timezone.

Returns

Apptus\ESales\Connector\Time\TimePoint
A point in time.
public
# equals( $o )
Methods inherited from Apptus\ESales\Connector\Time\IsoDate
parse(), parseInContext()
Apptus ESales Connector PHP API documentation generated by ApiGen