diff options
author | Chad Little <clittle@users.sourceforge.net> | 2004-05-20 06:04:14 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2004-05-20 06:04:14 +0000 |
commit | 0f13e5bce5215322b438006ab50acb3ba16709c9 (patch) | |
tree | a10b0f77307d21a4fddf66b49c7f0aae8424df0a /functions/draw_functions.php | |
parent | fcba93441ad7a97698f24f39c987b59ea1437e74 (diff) | |
download | phpicalendar-0f13e5bce5215322b438006ab50acb3ba16709c9.tar.gz phpicalendar-0f13e5bce5215322b438006ab50acb3ba16709c9.tar.bz2 phpicalendar-0f13e5bce5215322b438006ab50acb3ba16709c9.zip |
More ereg to preg_match speed tweeks.
Diffstat (limited to 'functions/draw_functions.php')
-rw-r--r-- | functions/draw_functions.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/functions/draw_functions.php b/functions/draw_functions.php index f84b5c2..2df0f37 100644 --- a/functions/draw_functions.php +++ b/functions/draw_functions.php @@ -4,7 +4,7 @@ function drawEventTimes ($start, $end) { global $gridLength; - ereg ("([0-9]{2})([0-9]{2})", $start, $time); + preg_match ('/([0-9]{2})([0-9]{2})/', $start, $time); $sta_h = $time[1]; $sta_min = $time[2]; $sta_min = sprintf("%02d", floor($sta_min / $gridLength) * $gridLength); @@ -13,7 +13,7 @@ function drawEventTimes ($start, $end) { $sta_min = "00"; } - ereg ("([0-9]{2})([0-9]{2})", $end, $time); + preg_match ('/([0-9]{2})([0-9]{2})/', $end, $time); $end_h = $time[1]; $end_min = $time[2]; $end_min = sprintf("%02d", floor($end_min / $gridLength) * $gridLength); |