PEAK XOOPS - [piCal] is this bug fixable? in englishin japanese

[piCal] is this bug fixable?

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2004/9/11 16:10
cchiu  ÆóÅùʼ   Posts: 3
The start day and end day:

If i type some invallid input as: 2004-9-abc the event is stored in the SQL without any control.

And if i type some the 'finished date' which is earlier then the 'start date', the event is also stored, but store somewhere that i cannot control.

btw, can some one tell me in the SQL xoops_pical_event data table, why 'start_date' and 'end_date' column are always 'NULL'? when will it be filled? Am i correct that they store the actuall start date and the end date of each event? Well if i am right, then what does 'start' and 'end' these two column do?

Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2004/9/25 6:47
GIJOE  ÀèǤ·³Áâ   Posts: 4110
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,

Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2004/10/9 17:18
cchiu  ÆóÅùʼ   Posts: 3
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
Votes:0 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2004/10/13 6:09
GIJOE  ÀèǤ·³Áâ   Posts: 4110
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.
Votes:6 Average:5.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!