Skip to content

Instantly share code, notes, and snippets.

@fightbulc fightbulc/app.php
Created Aug 18, 2015

What would you like to do?
moment test
require 'vendor/autoload.php';
// Using Moment --
$m = new \Moment\Moment('now', 'CST');
// Correct month 03 (March)
echo $m->format() . "\n";
// Wrong month, says "April"
echo $m->format('l, dS F Y / H:i (e)') . "\n";
// Using plain php date --
// Correct month March
$date = date('l, dS F Y / H:i (e)');
echo $date . "\n";
"require": {
"fightbulc/moment": "~1.7"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.