Created
May 5, 2012 16:37
-
-
Save 0xF1o/2603879 to your computer and use it in GitHub Desktop.
parsing dd.mm.yyyy hh:ss (tt.mm.jjjj ss:mm) date (used in austria)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function parse_austrian_date($date,$output='U'){ | |
$date = DateTime::createFromFormat('d.m.Y H:i', $date); | |
if($date === false) return false; | |
return $date->format($output); | |
} | |
echo parse_austrian_date('1.2.12 24:14','d.m.Y H:i:s'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment