Skip to content

Instantly share code, notes, and snippets.

@oanhnn
Created May 11, 2015 03:57
Show Gist options
  • Save oanhnn/49709a806cb7f4f2b5e0 to your computer and use it in GitHub Desktop.
Save oanhnn/49709a806cb7f4f2b5e0 to your computer and use it in GitHub Desktop.
Note for using strtotime function in PHP
<?php
/**
* Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components:
* if the separator is a slash (/), then the American m/d/y is assumed;
* whereas if the separator is a dash (-) or a dot (.), then the European d-m-y format is assumed.
*/
strtotime('12/25/2014');
strtotime('25-12-2014');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment