2017 © Pedro PelĂĄez
 

library datetime

Code Inc.'s datetime library

image

codeinc/datetime

Code Inc.'s datetime library

  • Tuesday, March 13, 2018
  • by joanfabregat
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

DateTime library

The is just an overlayoer above the native PHP DateTime class with extra methods., (*1)

Usage

<?php
use CodeInc\DateTime\DateTime;

/*
 * Can be instantiated with a timestamp (checked with is_numeric())
 */
$dateTime = new DateTime(time());

/*
 * Provides methods to tests the current time
 */ 
$dateTime->isUndefined();
$dateTime->isPast();
$dateTime->isNow();
$dateTime->isFutur();

/*
 * Provides methods to get SQL dates
 */
$dateTime->getSqlDate(); // YYYY-MM-DD
$dateTime->getSqlDateTime(); // AAAA-MM-JJ HH:MM:SS

/*
 * Provides a method to get a RFC 1123 date 
 */
$dateTime->getRfc1123();

/*
 * The formats are available in class constants 
 */
$dateTime::FORMAT_SQL_DATE;
$dateTime::FORMAT_SQL_DATETIME;
$dateTime::FORMAT_RFC_1123;

Installation

This library is available through Packagist and can be installed using Composer:, (*2)

composer require codeinc/datetime

License

The library is published under the MIT license (see LICENSE file)., (*3)

The Versions

13/03 2018

1.x-dev

1.9999999.9999999.9999999-dev https://github.com/CodeIncHQ/DateTime

Code Inc.'s datetime library

  Sources   Download

MIT

The Requires

  • php >=7.1

 

13/03 2018

dev-master

9999999-dev https://github.com/CodeIncHQ/DateTime

Code Inc.'s datetime library

  Sources   Download

MIT

The Requires

  • php >=7.1

 

13/03 2018

1.2.0

1.2.0.0 https://github.com/CodeIncHQ/DateTime

Code Inc.'s datetime library

  Sources   Download

MIT

The Requires

  • php >=7.1

 

08/03 2018

1.1.1

1.1.1.0 https://github.com/CodeIncHQ/lib-datetime

Code Inc.'s datetime library

  Sources   Download

MIT

The Requires

  • php >=7.1

 

27/02 2018

1.1.0

1.1.0.0 https://github.com/codeinchq/lib-datetime

Code Inc.'s datetime library

  Sources   Download

MIT

The Requires

  • php >=7.2

 

29/01 2018

1.0.0

1.0.0.0 https://github.com/codeinchq/lib-datetime

Code Inc.'s datetime library

  Sources   Download

MIT

The Requires

  • php >=7.0