diff options
author | friendica <info@friendica.com> | 2014-11-11 01:05:29 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-11-11 01:05:29 -0800 |
commit | 325b269b224615a9c584e0ec631a11d68bb24eb8 (patch) | |
tree | f5645acf4db71fcfa3b756fcf37578e4dc7a47f1 /include | |
parent | 0a84b45793735645357986bab20a0ed3cda80b38 (diff) | |
download | volse-hubzilla-325b269b224615a9c584e0ec631a11d68bb24eb8.tar.gz volse-hubzilla-325b269b224615a9c584e0ec631a11d68bb24eb8.tar.bz2 volse-hubzilla-325b269b224615a9c584e0ec631a11d68bb24eb8.zip |
the code is a bit crufty, but this should fix issue #687
Diffstat (limited to 'include')
-rw-r--r-- | include/datetime.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/datetime.php b/include/datetime.php index 00bac8ad1..47c63e51d 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -134,10 +134,17 @@ function dob($dob) { if(! $f) $f = 'ymd'; - if ($dob && $dob != '0000-00-00') - $o = datesel($f,mktime(0,0,0,0,0,1900),mktime(),mktime(0,0,0,$month,$day,$year),'dob'); + if($dob === '0000-00-00') + $value = ''; else - $o = datesel($f,mktime(0,0,0,0,0,1900),mktime(),false,'dob'); + $value = (($year) ? datetime_convert('UTC','UTC',$dob,'Y-m-d') : datetime_convert('UTC','UTC',$dob,'m-d')); + + $o = '<input type="text" name="dob" value="' . $value . '" placeholder="' . t('YYYY-MM-DD or MM-DD') . '" />'; + +// if ($dob && $dob != '0000-00-00') +// $o = datesel($f,mktime(0,0,0,0,0,1900),mktime(),mktime(0,0,0,$month,$day,$year),'dob'); +// else +// $o = datesel($f,mktime(0,0,0,0,0,1900),mktime(),false,'dob'); return $o; } |