Skip to content

Installation

Install DateTime with Composer.

shell
composer require raxos/datetime

Requirements

The package has no required PHP extensions of its own.

Raxos dependencies

  • raxos/foundation: provides the StringParsableInterface and other contracts used by the value objects.

Optional integrations

  • raxos/database: enables the DateCaster, TimeCaster and DateTimeCaster ORM casters. Install it when you want to bind these value objects to model columns.
  • raxos/router: recognizes the value objects as path parameters through StringParsableInterface, so a route segment can bind directly to a Date, Time or DateTime instance.

Return to the DateTime introduction.