23/07
2018
Date helpers for citripio websites
Add this to your composer.json
, (*1)
{ "require": { "citripio/date": "^1.0" } }
Then:, (*2)
require_once "./vendor/autoload.php"; $date_utils = new Citripio\Date( array( "lang" => "es", ) );
Receives a PHP Date date("Y-m-d H:i:s")
. Returns true
if it's today., (*3)
Receives a PHP Date date("Y-m-d H:i:s")
. Returns true
if it's yesterday., (*4)
Receives an integer representing a month of the year, returns its name., (*5)
Receives an integer representing a day of the week, returns its name., (*6)
Useful for composing headings and other strings with dates in them., (*7)
Receives a PHP Date date("Y-m-d H:i:s")
. Returns an array containing:, (*8)
day()
month()