Revision 744
Added by thorn over 17 years ago
| jscalendar-functions.php | ||
|---|---|---|
| 30 | 30 |
// strtotime() may fails with e.g. "dd.mm.yyyy" and PHP4 |
| 31 | 31 |
function jscalendar_to_timestamp($str, $offset='') {
|
| 32 | 32 |
$str = trim($str); |
| 33 |
if($str == '0' || $str == '') |
|
| 34 |
return('0');
|
|
| 35 |
if($offset == '0') |
|
| 36 |
$offset = ''; |
|
| 33 | 37 |
// convert to yyyy-mm-dd |
| 34 | 38 |
// "dd.mm.yyyy"? |
| 35 | 39 |
if(preg_match('/^\d{1,2}\.\d{1,2}\.\d{2}(\d{2})?/', $str)) {
|
Also available in: Unified diff
fixed issue with news and end-date