BEdita API doc | 4-cactus
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Download

Namespaces

  • BEdita
    • API
      • Auth
      • Controller
        • Admin
        • Component
        • Model
      • Error
      • Event
      • Exception
      • Middleware
      • Model
        • Action
      • Network
        • Exception
      • Shell
      • TestSuite
      • Utility
    • Core
      • Configure
        • Engine
      • Database
        • Type
      • Exception
      • Filesystem
        • Adapter
        • Exception
        • Thumbnail
      • I18n
      • Job
        • Service
      • Mailer
        • Preview
        • Transport
      • Model
        • Action
        • Behavior
        • Entity
        • Table
        • Validation
      • ORM
        • Inheritance
        • Locator
        • Rule
      • Shell
        • Task
      • State
      • TestSuite
        • Fixture
      • Utility

Classes

  • BoolType
  • DateTimeType
  • DateType
  • JsonObjectType

Class DateTimeType

Custom DateTimeType class with simplified marshal

Cake\Database\Type\DateTimeType
Extended by BEdita\Core\Database\Type\DateTimeType
Namespace: BEdita\Core\Database\Type
Located at Core/src/Database/Type/DateTimeType.php

Methods summary

public
# marshal( $value )
public static DateTimeInterface|null|mixed
# marshalDateTime( mixed $value, string $dateTimeClassName )

Accepted date time formats are - 2017-01-01 YYYY-MM-DD - 2017-01-01 11:22 YYYY-MM-DD hh:mm - 2017-01-01T11:22:33 YYYY-MM-DDThh:mm:ss - 2017-01-01T11:22:33Z YYYY-MM-DDThh:mm:ssZ - 2017-01-01T19:20+01:00 YYYY-MM-DDThh:mmTZD - 2017-01-01T11:22:33+0100 YYYY-MM-DDThh:mm:ssTZD - 2017-01-01T19:20:30.45+01 YYYY-MM-DDThh:mm:ss.sTZD

Accepted date time formats are - 2017-01-01 YYYY-MM-DD - 2017-01-01 11:22 YYYY-MM-DD hh:mm - 2017-01-01T11:22:33 YYYY-MM-DDThh:mm:ss - 2017-01-01T11:22:33Z YYYY-MM-DDThh:mm:ssZ - 2017-01-01T19:20+01:00 YYYY-MM-DDThh:mmTZD - 2017-01-01T11:22:33+0100 YYYY-MM-DDThh:mm:ssTZD - 2017-01-01T19:20:30.45+01 YYYY-MM-DDThh:mm:ss.sTZD

See ISO 8601 subset as defined here https://www.w3.org/TR/NOTE-datetime: Valid TZD formats are: ±hh:mm, ±hhmm and ±hh, e.g. +01:00, +0100 and +01

Parameters

$value
DateTime input
$dateTimeClassName
DateTime class name to use to parse string

Returns

DateTimeInterface|null|mixed
BEdita API doc | 4-cactus API documentation generated by ApiGen