From 44b19841360099cc3e78d1a3612f7aa23e2e6524 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Sat, 10 Jul 2010 07:09:57 -0700 Subject: profile additions --- include/datetime.php | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'include/datetime.php') diff --git a/include/datetime.php b/include/datetime.php index 0beadbe78..540c43691 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -60,7 +60,12 @@ function datetime_convert($from = 'UTC', $to = 'UTC', $s = 'now', $fmt = "Y-m-d return($d->format($fmt)); }} - +function dob($dob) { + list($year,$month,$day) = sscanf($dob,'%4d-%2d-%2d'); + $y = datetime_convert('UTC',date_default_timezone_get(),'now','Y'); + $o = datesel('',1920,$y,true,$year,$month,$day); + return $o; +} if(! function_exists('datesel')) { function datesel($pre,$ymin,$ymax,$allow_blank,$y,$m,$d) { @@ -68,25 +73,27 @@ function datesel($pre,$ymin,$ymax,$allow_blank,$y,$m,$d) { $o = ''; $o .= "- - "; -- cgit v1.2.3