switch(count($parts)) {
case 1:
$year = $parts[0];
- list($month, $day) = explode('/', date('m/d'));
+ if(strlen($year) == 0) {
+ list($month, $day, $year) = explode('/', date('m/d/Y'));
+ } else {
+ list($month, $day) = explode('/', date('m/d'));
+ }
break;
case 2:
list($month, $year) = $parts;
switch(count($parts)) {
case 1:
$year = $parts[0];
- list($month, $day) = explode('-', date('m-d'));
+ if(strlen($year) == 0) {
+ list($year, $month, $day) = explode('-', date('Y-m-d'));
+ } else {
+ list($month, $day) = explode('-', date('m-d'));
+ }
break;
case 2:
list($year, $month) = $parts;
return sprintf('%02u/%02u/%04u', $month, $day, $year);
}
+function enc_mdy($date) {
+ return ymd_to_mdy($date);
+}
+
?>