Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • Drivers
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
      • Traits
    • Reflection
    • Security
    • Tokenizer
    • Utils
  • Tracy
    • Bridges
      • Nette
  • none

Classes

  • ArrayHash
  • ArrayList
  • Arrays
  • Callback
  • DateTime
  • FileSystem
  • Finder
  • Html
  • Image
  • Json
  • ObjectHelpers
  • ObjectMixin
  • Paginator
  • Random
  • Reflection
  • SafeStream
  • Strings
  • TokenIterator
  • Tokenizer
  • Validators

Interfaces

  • IHtmlString

Exceptions

  • AssertionException
  • ImageException
  • JsonException
  • RegexpException
  • TokenizerException
  • UnknownImageFileException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases

Class DateTime

DateTime.

DateTime implements DateTimeInterface
Extended by Nette\Utils\DateTime implements JsonSerializable uses Nette\SmartObject
Namespace: Nette\Utils
Located at Utils/DateTime.php
Methods summary
public static Nette\Utils\DateTime
# from( string|integer|DateTimeInterface $time )

DateTime object factory.

DateTime object factory.

Parameters

$time

Returns

Nette\Utils\DateTime
static
public static Nette\Utils\DateTime
# fromParts( $year, $month, $day, $hour = 0, $minute = 0, $second = 0 )

Creates DateTime object.

Creates DateTime object.

Returns

Nette\Utils\DateTime
static
public static Nette\Utils\DateTime|false
# createFromFormat( string $format, string $time, string|DateTimeZone $timezone = null )

Returns new DateTime object formatted according to the specified format.

Returns new DateTime object formatted according to the specified format.

Parameters

$format
format the $time parameter should be in
$time
representing the time
$timezone
timezone (default timezone is used if null is passed)

Returns

Nette\Utils\DateTime|false
static|false

Overrides

DateTime::createFromFormat()
public string
# jsonSerialize( )

Returns JSON representation in ISO 8601 (used by JavaScript).

Returns JSON representation in ISO 8601 (used by JavaScript).

Returns

string
string

Implementation of

JsonSerializable::jsonSerialize()
public string
# __toString( )

Returns

string
string
public Nette\Utils\DateTime
# modifyClone( string $modify = '' )

Parameters

$modify

Returns

Nette\Utils\DateTime
static
public Nette\Utils\DateTime
# setTimestamp( integer $timestamp )

Parameters

$timestamp

Returns

Nette\Utils\DateTime
static

Overrides

DateTime::setTimestamp()
public integer|string
# getTimestamp( )

Returns

integer|string
int|string

Overrides

DateTime::getTimestamp()
Methods inherited from DateTime
__construct(), __set_state(), __wakeup(), add(), diff(), format(), getLastErrors(), getOffset(), getTimezone(), modify(), setDate(), setISODate(), setTime(), setTimezone(), sub()
Methods used from Nette\SmartObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Constants summary
integer MINUTE

minute in seconds

minute in seconds

#60
integer HOUR

hour in seconds

hour in seconds

#60*self::MINUTE
integer DAY

day in seconds

day in seconds

#24*self::HOUR
integer WEEK

week in seconds

week in seconds

#7*self::DAY
integer MONTH

average month in seconds

average month in seconds

#2629800
integer YEAR

average year in seconds

average year in seconds

#31557600
Constants inherited from DateTime
ATOM, COOKIE, ISO8601, RFC1036, RFC1123, RFC2822, RFC3339, RFC822, RFC850, RSS, W3C
Nette 2.4-20180918 API API documentation generated by ApiGen 2.8.0