Class OrdinalDate
A date on the form YYYY-DDD according to the Gregorian calendar, where
DDD specifies the day of year.
This class describes an ordinal date as defined by ISO 8601.
-
Apptus\ESales\Connector\Time\IsoDate
-
Apptus\ESales\Connector\Time\OrdinalDate
Methods summary
public
|
#
__construct( integer $year, integer|null $dayOfYear )
Creates a new calendar date with the specified year and day.
Creates a new calendar date with the specified year and day.
The day may be omitted for less precision.
Parameters
- $year
- year, e.g. 2001.
- $dayOfYear
- day of year, e.g. 135.
Throws
|
public
integer
|
#
year( )
Returns the year. Never returns null.
Returns the year. Never returns null.
Returns
integer
|
public
integer|null
|
#
dayOfYear( )
Returns the day of year, if specified at creation. Otherwise returns null.
Returns the day of year, 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
|
public
|
|