hi cchiu.
It's a bug certainly.
Thanks!
line 253 of piCal.php
function parse_posted_date( $date_desc , $default_unixtime )
{
if( ! ereg( "^([0-9][0-9]+)[-./]?([0-1]?[0-9])[-./]?([0-3]?[0-9])$" , $date_desc , $regs ) ) {
$unixtime = $default_unixtime ;
It is ordinary that the fields of 'start_date' and 'end_date' are NULL.
'start' and 'end' can only store 1970 to 2038.
'start_date' or 'end_date' will be not NULL, only the events started before 1970 or after 2038,
Hmm.. now i am learning the straing pattern. Coz I think the date input function can't handle many error input cases very well. (Assuming that all the inexperence users can have high chance to input some wrong input.)
I modified the string pattern to:
if( ! ereg( "^(197[1-9]|19[8-9][0-9]|20[0-2][0-9]|203[0-7])[-./]?([0-1]?[0-9])[-./]?([0-3]?[0-9])$" , $date_desc , $regs ) )
Do you guys think it can handle the invalid date input as:
004-10-10
a2004-10-10
0000-00-00
2004aaaa-10-10
0000000000000000000
123456789012345
etc?
the new pattern will restrict the date input, and now when piCal detects these invalid input, it will use the date of today instead.
Btw,
Wen using the recur rule:
if i have a "Until date" that is earlier than the 'Beginning Date' of the event. It still store in the database as a valid event. Is there any other way to check this case?
Thsnks man
hi cchiu.
As piCal can treat events which begins earlier than 1970 or later than 2037, I can't adopt your pattern.
eg) descirpting the birthday of John Lenon.
begin: 1940-10-9
end: 1940-10-9
recur: YEALY;BYMONTH=10;BYMONTHDAY=9;
This event a valid for now and then.
Quote:
Wen using the recur rule:
if i have a "Until date" that is earlier than the 'Beginning Date' of the event. It still store in the database as a valid event. Is there any other way to check this case?
I don't think this check is necessary.