ICanBoogie
  • Documentation
  • API Reference
  • DateTime 2.0.x
Namespaces
  • ICanBoogie
    • DateTime
Classes
  • DateTimeLocalizer
  • ImmutableDateTime
  • MutableDateTime
  • TimeZone
  • TimeZoneLocation
Interfaces
  • DateTime

Class MutableDateTime

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

Methods summary

public static now( void ) : ICanBoogie\MutableDateTime

Returns

ICanBoogie\MutableDateTime

Inheritdoc

Implementation of

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

Returns

ICanBoogie\MutableDateTime
protected get_tomorrow( void ) : ICanBoogie\MutableDateTime

Returns

ICanBoogie\MutableDateTime
protected get_yesterday( void ) : ICanBoogie\MutableDateTime

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 with( array $options, boolean $cascade = false ) : ICanBoogie\DateTime

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 change( array $options, $cascade = false ) : ICanBoogie\MutableDateTime

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

ISO8601 : string
'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 $year : integer

Year.

public $month : integer

Month of the year.

public $day : integer

Day of the month.

public $hour : integer

Hour of the day.

public $minute : integer

Minute of the hour.

public $second : integer

Second of the minute.

public $timestamp : integer

Unix timestamp.

public $timezone : ICanBoogie\TimeZone

The timezone of the instance.

public $tz : ICanBoogie\TimeZone

The timezone of the instance.

public read-only $tomorrow : ICanBoogie\MutableDateTime

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

public read-only $yesterday : ICanBoogie\MutableDateTime

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

public read-only $monday : ICanBoogie\MutableDateTime

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

public read-only $tuesday : ICanBoogie\MutableDateTime

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

public read-only $wednesday : ICanBoogie\MutableDateTime

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

public read-only $thursday : ICanBoogie\MutableDateTime

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

public read-only $friday : ICanBoogie\MutableDateTime

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

public read-only $saturday : ICanBoogie\MutableDateTime

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

public read-only $sunday : ICanBoogie\MutableDateTime

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

public read-only $utc : ICanBoogie\MutableDateTime

A new instance in the UTC timezone.

public read-only $local : ICanBoogie\MutableDateTime

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

DateTime 2.0.x – Check on GitHub – API documentation generated by ApiGen