diff options
author | Habeas Codice <habeascodice@federated.social> | 2014-11-13 13:06:31 -0800 |
---|---|---|
committer | Habeas Codice <habeascodice@federated.social> | 2014-11-13 13:06:31 -0800 |
commit | ac27db22c18ee7a82a52cbadb3efe2760b910499 (patch) | |
tree | aa7002d73dbcd4136033589f1cb135184f4126c1 /include/datetime.php | |
parent | 1a5a5c7edb8697c93f8bababbafa80245378dd7e (diff) | |
parent | 109cb936632c693d3f24afb9e2ce533797ad1a7f (diff) | |
download | volse-hubzilla-ac27db22c18ee7a82a52cbadb3efe2760b910499.tar.gz volse-hubzilla-ac27db22c18ee7a82a52cbadb3efe2760b910499.tar.bz2 volse-hubzilla-ac27db22c18ee7a82a52cbadb3efe2760b910499.zip |
Merge remote-tracking branch 'upstream/master'
Conflicts:
boot.php
include/dba/dba_driver.php
include/diaspora.php
include/follow.php
include/session.php
include/zot.php
mod/photos.php
mod/ping.php
Diffstat (limited to 'include/datetime.php')
-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 bfaa8792b..270be5e3d 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; } |