Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

alexeyshockov/clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clock Build Status

Goal

Convenient and safe way to work with date & time in PHP.

Benefits

  • Rich, easy to understand (and remember) method set.
  • Functional idioms:
    • immutable collections (safest and usable for most cases).

Installation

Clock currently may be installed as submodule for your Git project:

git submodule add git://github.com/alexeyshockov/clock.git vendor/clock

or throught Composer:

{
    "require": {
        "alexeyshockov/clock": "dev-master"
    }
}

Usage

Some examples:

<?php

$period = new \DatePeriod('R5/2008-03-01T13:00:00Z/P1Y2M10DT2H30M');

// Converting period to collection of dates with Colada.
$dates = to_collection($period);

$formattedDates = $dates->mapBy(x()->format(\DateTime::ATOM));

About

Easy date & time manipulation for PHP

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages