ICanBoogie/DateTime 2.0.x
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • DateTime

Classes

  • DateTimeLocalizer
  • ImmutableDateTime
  • MutableDateTime
  • TimeZone
  • TimeZoneLocation

Interfaces

  • DateTime

Class MutableDateTime

DateTime implements DateTimeInterface
Extended by ICanBoogie\MutableDateTime implements JsonSerializable, ICanBoogie\DateTime uses ICanBoogie\DateTime\Shared, ICanBoogie\DateTime\Readers
Namespace: ICanBoogie
Located at MutableDateTime.php

Methods summary

public static ICanBoogie\MutableDateTime
# now( )

Returns

ICanBoogie\MutableDateTime

Inheritdoc

Implementation of

ICanBoogie\DateTime::now()
protected ICanBoogie\MutableDateTime
# get_local( )

Returns

ICanBoogie\MutableDateTime
protected ICanBoogie\MutableDateTime
# get_tomorrow( )

Returns

ICanBoogie\MutableDateTime
protected ICanBoogie\MutableDateTime
# get_yesterday( )

Returns

ICanBoogie\MutableDateTime
public
# __set( $property, $value )

Sets the $year, $month, $day, $hour, $minute, $second, $timestamp and $zone properties.

Sets the $year, $month, $day, $hour, $minute, $second, $timestamp and $zone properties.

Throws

LogicException
in attempt to set a read-only or undefined property.

Inheritdoc

public ICanBoogie\DateTime
# with( array $options, boolean $cascade = false )

Parameters

$options
$cascade

Returns

ICanBoogie\DateTime

Inheritdoc

Implementation of

ICanBoogie\DateTime::with()

Methods inherited from DateTime

__construct(), __set_state(), __wakeup(), add(), createFromFormat(), diff(), format(), getLastErrors(), getOffset(), getTimestamp(), getTimezone(), modify(), setDate(), setISODate(), setTime(), setTimestamp(), setTimezone(), sub()

Methods inherited from JsonSerializable

jsonSerialize()

Methods inherited from ICanBoogie\DateTime

change(), from(), localize(), none(), right_now()

Methods used from ICanBoogie\DateTime\Shared

__call(), __construct(), __toString(), change(), format(), from(), getTimestamp(), getTimezone(), jsonSerialize(), localize(), none(), right_now(), setDate(), setTime(), setTimezone()

Methods used from ICanBoogie\DateTime\Readers

__get(), get_friday(), get_immutable(), get_is_dst(), get_monday(), get_mutable(), get_saturday(), get_sunday(), get_thursday(), get_timestamp(), get_timezone(), get_tuesday(), get_tz(), get_wednesday(), modify()

Magic methods summary

public ICanBoogie\MutableDateTime
# change( array $options, $cascade = false )

Parameters

$options
$cascade

Returns

ICanBoogie\MutableDateTime
$this

Implementation of

ICanBoogie\DateTime::change()

Magic methods used from ICanBoogie\DateTime\Shared

format_as_atom(), format_as_cookie(), format_as_date(), format_as_db(), format_as_iso8601(), format_as_number(), format_as_rfc1036(), format_as_rfc1123(), format_as_rfc2822(), format_as_rfc3339(), format_as_rfc822(), format_as_rfc850(), format_as_rss(), format_as_time(), format_as_w3c()

Constants summary

string ISO8601
# 'Y-m-d\TH:i:sP'

Constants inherited from DateTime

ATOM, COOKIE, ISO8601, RFC1036, RFC1123, RFC2822, RFC3339, RFC3339_EXTENDED, RFC822, RFC850, RSS, W3C

Constants inherited from ICanBoogie\DateTime

DATE, DB, NUMBER, TIME

Properties summary

Magic properties

public integer $year

Year.

public integer $month

Month of the year.

public integer $day

Day of the month.

public integer $hour

Hour of the day.

public integer $minute

Minute of the hour.

public integer $second

Second of the minute.

public integer $timestamp

Unix timestamp.

public ICanBoogie\TimeZone $timezone

The timezone of the instance.

public ICanBoogie\TimeZone $tz

The timezone of the instance.

public read-only ICanBoogie\MutableDateTime $tomorrow

A new instance representing the next day. Time is reset to 00:00:00.

public read-only ICanBoogie\MutableDateTime $yesterday

A new instance representing the previous day. Time is reset to 00:00:00.

public read-only ICanBoogie\MutableDateTime $monday

A new instance representing Monday of the week. Time is reset to 00:00:00.

public read-only ICanBoogie\MutableDateTime $tuesday

A new instance representing Tuesday of the week. Time is reset to 00:00:00.

public read-only ICanBoogie\MutableDateTime $wednesday

A new instance representing Wednesday of the week. Time is reset to 00:00:00.

public read-only ICanBoogie\MutableDateTime $thursday

A new instance representing Thursday of the week. Time is reset to 00:00:00.

public read-only ICanBoogie\MutableDateTime $friday

A new instance representing Friday of the week. Time is reset to 00:00:00.

public read-only ICanBoogie\MutableDateTime $saturday

A new instance representing Saturday of the week. Time is reset to 00:00:00.

public read-only ICanBoogie\MutableDateTime $sunday

A new instance representing Sunday of the week. Time is reset to 00:00:00.

public read-only ICanBoogie\MutableDateTime $utc

A new instance in the UTC timezone.

public read-only ICanBoogie\MutableDateTime $local

A new instance in the local timezone.

Magic properties used from ICanBoogie\DateTime\Shared

$as_iso8601, $is_empty

Magic properties used from ICanBoogie\DateTime\Readers

$as_atom, $as_cookie, $as_date, $as_db, $as_number, $as_rfc1036, $as_rfc1123, $as_rfc2822, $as_rfc3339, $as_rfc822, $as_rfc850, $as_rss, $as_time, $as_w3c, $immutable, $is_dst, $is_friday, $is_future, $is_local, $is_monday, $is_past, $is_saturday, $is_sunday, $is_thursday, $is_today, $is_tuesday, $is_utc, $is_wednesday, $mutable, $quarter, $week, $weekday, $year_day

ICanBoogie/DateTime 2.0.x API documentation generated by ApiGen