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/ical_parser.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/ical_parser.php')
-rw-r--r-- | functions/ical_parser.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php index 8af8e03..e6301a5 100644 --- a/functions/ical_parser.php +++ b/functions/ical_parser.php @@ -204,7 +204,7 @@ foreach ($cal_filelist as $filename) { } if (isset($start_time) && $start_time != '') { preg_match ('/([0-9]{2})([0-9]{2})/', $start_time, $time); - preg_match ('([0-9]{2})([0-9]{2})', $end_time, $time2); + preg_match ('/([0-9]{2})([0-9]{2})/', $end_time, $time2); if (isset($start_unixtime) && isset($end_unixtime)) { $length = $end_unixtime - $start_unixtime; } else { @@ -212,7 +212,7 @@ foreach ($cal_filelist as $filename) { } $drawKey = drawEventTimes($start_time, $end_time); - ereg ('([0-9]{2})([0-9]{2})', $drawKey['draw_start'], $time3); + preg_match ('/([0-9]{2})([0-9]{2})/', $drawKey['draw_start'], $time3); $hour = $time3[1]; $minute = $time3[2]; } @@ -949,7 +949,7 @@ foreach ($cal_filelist as $filename) { foreach ($data as $exdata) { $exdata = str_replace('T', '', $exdata); $exdata = str_replace('Z', '', $exdata); - ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})', $exdata, $regs); + preg_match ('/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})/', $exdata, $regs); $except_dates[] = $regs[1] . $regs[2] . $regs[3]; $except_times[] = $regs[4] . $regs[5]; } |