Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added: format_h_w_image()
[wfpl.git]
/
time.php
diff --git
a/time.php
b/time.php
index
81f4048
..
a3bc761
100644
(file)
--- a/
time.php
+++ b/
time.php
@@
-81,7
+81,11
@@
function mdy_to_ymd($date) {
switch(count($parts)) {
case 1:
$year = $parts[0];
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;
break;
case 2:
list($month, $year) = $parts;
@@
-104,7
+108,11
@@
function ymd_to_mdy($date) {
switch(count($parts)) {
case 1:
$year = $parts[0];
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;
break;
case 2:
list($year, $month) = $parts;