I am creating a calendar for Workshop Sessions and followed all the instructions... This is my setup:

Drupal 5.1
Calendar 5.x-1.4
Date 5.x-1.5
Views 5.x-1.5

I created a new content type Session and have a From date with an optional To Date.

I used the standard Calendar View and added my field Date (Time)

I have inputted 2 weeks of sessions from Sun to Sat. When I look at it in the Year and Month view data is present. When I look at the week view - for one week it showed 5 days of sessions and the other week showed 6.

Is there something else I need to do or check? For a sanity check, I went through all the steps again just now creating a brand new view and it happened again.

Thanks for help!

Comments

srcerer’s picture

I have narrowed this down to the ISO Date range. For October 16-22, 2005, I am requesting week 42 (which is correct) and while I see the correct week, the $min_date is set as the 13th and the $max_date is set as the 20th.

When I display month by month, the ISO Calendar date that prints in the first column is correct and as I mentioned, all my data for that month does show.

It's not clear if this is a Calendar or Date issue. I am not using the latest dev version of Calendar but I am using the latest release of Date.

I will probably have to theme the calendar display so I can lay it out hour by hour on the left hand side. It's not clear to me if I will get all the data since the query looks like it isn't being set correctly.

My first date is actually 2005-10-16 and my last date is 2005-10-22. I got this array from the $queries set in calendar.module function calendar_views_query_alter(&$query, &$view):

Array
(
[0] => (( REPLACE(node_data_field_start_time.field_start_time_value2,'T',' ')
+ INTERVAL (-28800) SECOND) >='2005-10-13T00:00:00' AND
( REPLACE(node_data_field_start_time.field_start_time_value,'T',' ')
+ INTERVAL (-28800) SECOND) <='2005-10-20T23:59:59')
)

Any insight is greatly appreciated.

srcerer’s picture

Damn... I just realized that Sunday, 16 October 2005 is actually week 41. Monday, 17 October 2005 is week 42. (according to this: http://personal.ecu.edu/mccartyr/isowdcal.html). So then I would expect to lose my Sunday data, not my Friday/Saturday data.

I am having the same issue with another date range in 2006 (5-11 March). I am passing in W10 and get Sunday through Friday's data. Saturday is missing here.

(I know these are in the past but I will be inputting the future workshops for this Fall soon.)

Hmmm...is there an issue between the way the weekly calendar displays Sunday through Saturday and ISO weeks start on Monday?

I've seen it requested elsewhere to have the calendar show a couple weeks - it doesn't seem possible right now and it's not clear if date-ranges will be supported.

If this is really an issue, then I think the only way I can handle this is either by showing the full month or theming my own week view based on the data I get for a whole month. Or re-themeing the Date browser....

KarenS’s picture

Status: Active » Fixed

Week view is very tricky due to differences between the stated first day of the week, the concept of an ISO week (counting from the first week that has at least 4 days in it), and what might appear to be a more normal idea of a week (counting from the first week in the year that has any days in it), so any day might belong to several different weeks, depending on how you're configured. I finally just turned the 'Week' option off for now.

I am hoping I can better support weeks after improving the Date API, a project I hope to get done in the next couple of weeks.

So I am closing this as a support request, since at the moment, this isn't supported properly.

Anonymous’s picture

Status: Fixed » Closed (fixed)