lightsource/date-time

Helper for working with a standard DateTime class, provide functions like adding DateInterval, etc..

2.0.4 2021-08-30 13:16 UTC

This package is auto-updated.

Last update: 2024-05-19 23:51:57 UTC


README

Latest Stable Version Total Downloads Monthly Downloads Daily Downloads License

What is it

Helper for working with a standard DateTime class, provide functions like adding DateInterval, etc..

Installation

composer require lightsource/date-time

Example of usage

use LightSource\DateTime\DATE_TIME;

require_once __DIR__ . '/vendor/autoload.php';

$futureDateTime = DATE_TIME::AddPeriod( DATE_TIME::HOURS, 3 );
$nowTimestamp   = DATE_TIME::ToTimestamp();
$isFuture       = DATE_TIME::IsFuture( $futureDateTime );