| 499 | | |
|---|
| | 499 | function foldatevalidation($foldate){ |
|---|
| | 500 | |
|---|
| | 501 | if (strlen($foldate) == 12 ){ |
|---|
| | 502 | |
|---|
| | 503 | $startyear = substr($foldate,0,4); |
|---|
| | 504 | $startmonth = substr($foldate,4,2); |
|---|
| | 505 | $startday = substr($foldate,6,2); |
|---|
| | 506 | $starthour = substr($foldate,8,2); |
|---|
| | 507 | $startmin = substr($foldate,10,2); |
|---|
| | 508 | |
|---|
| | 509 | $startepoch = date ("U",mktime($starthour , $startmin , 0, $startmonth , $startday, $startyear)); |
|---|
| | 510 | $nowe = time(); |
|---|
| | 511 | if ($startepoch > $nowe){ |
|---|
| | 512 | //print "$foldate:$startepoch:$nowe"; |
|---|
| | 513 | return TRUE; |
|---|
| | 514 | }else{ |
|---|
| | 515 | return FALSE; |
|---|
| | 516 | } //end if $startepoch > $nowe |
|---|
| | 517 | }else{ |
|---|
| | 518 | return FALSE; |
|---|
| | 519 | }//end if ($foldate) == 12 |
|---|
| | 520 | |
|---|
| | 521 | }//end function |
|---|