aboutsummaryrefslogtreecommitdiffstats
path: root/functions/draw_functions.php
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-05-20 06:04:14 +0000
committerChad Little <clittle@users.sourceforge.net>2004-05-20 06:04:14 +0000
commit0f13e5bce5215322b438006ab50acb3ba16709c9 (patch)
treea10b0f77307d21a4fddf66b49c7f0aae8424df0a /functions/draw_functions.php
parentfcba93441ad7a97698f24f39c987b59ea1437e74 (diff)
downloadphpicalendar-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.php4
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);

© 2014-2024 Faster IT GmbH | imprint | privacy policy