Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationHacks and Mods (Moderators: scott, DanO, Marty)time sort - recurring events problem
Pages: [1]   Go Down
Print
Author Topic: time sort - recurring events problem  (Read 400 times)
0 Members and 1 Guest are viewing this topic.
debra
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: March 18, 2005, 02:59:00 PM »

I'm having a helluva time with the time sort. I've read every post about this numerous times.

If I enter one-time events, it seems to be sorting by time correctly.
However, I have 1 recurring event, every Wednesday and Saturday, and 1 event that spans several days.

On the days that both events occur, the later event is showing first.

Link is:  http://test.drwdesign.com/cgi-bin/calendar.pl?year=2005&month=4

If you go to the next month, May, my test events are there, which sort fine.

Any ideas?Huh???

I've entered the time with leading zeros, which seem to drop randomly when I go back to edit. I've done it without the zeros. I've entered one first, then the other first. I've tried the code suggested in other posts, and nothing seems to work.

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: March 19, 2005, 02:55:00 AM »

** I've tried the code suggested in other posts, and nothing seems to work. **

Which was what (besides the way you're entering the times)?
Dan O.

------------------

Logged
debra
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: March 19, 2005, 02:26:00 PM »

I've tried adding:
<% @$EVENTS = sort {$a->{schedule}->{start_time} cmp $b->{schedule}->{start_time} } @$EVENTS; %>

before each <%FOREACH EVENT%> in default.htm, but that causes my test events in May to sort from latest to earliest!

Does it matter if I enter the time for something like "3:30" as "03:30" or not?

And is the calendar programmed to sort multiple event times from earliest to latest by default?

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: March 19, 2005, 06:34:00 PM »

** that causes my test events in May to sort from latest to earliest! **

I don't know why that would be but just switch the $a and $b around to reverse the sort.

** Does it matter if I enter the time for something like "3:30" as "03:30" or not? **

It shouldn't. I believe all times are converted to 24 hour notations. eg. 0330

** is the calendar programmed to sort multiple event times from earliest to latest by default? **

The only place I'm certain that occurs is on the 'Day View' pages. I don't know if the grid's events as suppose to be sorted by time or not.

Dan O.

------------------

Logged
debra
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: March 23, 2005, 05:24:00 PM »

**
I don't know why that would be but just switch the $a and $b around to reverse the sort.

**

I don't know why, either, but doing that made it all work.

A thousand thanks.

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #5 on: March 23, 2005, 09:21:00 PM »

** doing that made it all work. **

Glad to hear it.

Dan O.

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: