I'm not sure if this is a Calendar themeing issue or a Date module display format issue ... ? I'll try to explain with a series of examples ... I know it may look complex, but if it helps to de-clutter the calendar it must be a good thing ?

    Month View: As I understand it, the 'event block' info that appears in the Month view is the view Field data. Calendar.module already strips out date_info (good). I'm suggesting some minor changes to abbreviate the time_info even further, and instead of Start ... End labels I think From ... Until would be clearer.
  1. if event spans less than 1 day; show eg:
    08:00 - 17:00
  2. if event spans more than 1 day & is the start_date; show eg:
    From 08:00
  3. if event spans more than 1 day & is neither the start_date nor the end_date; show eg:
    ...
  4. if event spans more than 1 day & is the end_date; show eg:
    Until 17:00
    Day View: As I understand it, the 'event block' info that appears in the Day view is the node Teaser. The calendar context tells you what year, month and day we're looking at, so there's usually no need to druplicate this date info (eg 2007 Aug 08) in the 'event block' itself.
  1. if event spans less than 1 day; show eg:
    08:00 - 17:00
  2. if event spans more than 1 day; show eg:
    From Monday (08:00) to Tuesday (17:00)
  3. if event spans more than 1 week; show eg:
    From Mon 8th (08:00) to Tue 9th (17:00)
  4. if event spans more than 1 month; show eg:
    From Mon 8th August (08:00) to Tue 9th September (17:00)
  5. if event spans more than 1 year; show eg :
    From Mon 8th August 2007 (08:00) to Tue 9th September 2008 (17:00)
  6. Also remove the 'submitted' info from the Day View Teaser - it really confuses things !!!

Comments

karens’s picture

Because there are so many different possibilities for what kind of information you may want to display in the day view of the calendar -- CCK date fields, event module nodes, created or changed time for regular nodes, or some combination of those things -- there is no intelligent way for the Calendar module to decide what you actually might want to display, which is why it defaults to display your regular teaser view. You can alter your teaser view in your theme if you want to show something different.

The calendar module is adding 'start' and 'end' times to the month view, so it is reasonable to discuss different ways to display those. You can control that in your theme now, though, so this is not high priority.

JohnG-1’s picture

Priority: Normal » Minor

Thanks for the prompt reply, K

To clarify :

The only Date fields I'm trying to address here are those used to describe a 'time-span' between a Start_time and End-time. I want to call them 'date-range' fields but that might be confusing them with something else ;) These are a distinct type of date field, and are used in a special way by the Calendar. Have I got that about right ?

So the display format of 'time-span' date fields in teasers is a Date module theme function?

I will have a rummage in the calendar theme for the Start & End labels ... and post anything successful ;) Thanks for your patience.

JohnG-1’s picture

StatusFileSize
new1.92 KB

attached is a copy of the function phptemplate_calendar_node_month which implements the changes described above (more or less). Thanks K for writing such easily edited code :)

'08:00 - 17:00 ' = single day event
'From 08:00 ... ' = first day of multi-day event
' ... ongoing ... ' = middle day of multi-day event
' ... until 17:00 ' = last day of multi-day event

well I'm happy :)

JohnG-1’s picture

Version: 7.x-1.x-dev » 5.x-1.x-dev
Category: feature » support
StatusFileSize
new2.55 KB

OK I've created this template.php override for the date.module function theme_date_display_combination, thanks to http://drupal.org/node/123181 :) It takes care of the 'Day View' improvements suggested above, and does no harm to node views either. Please come and play with it on my test site : http://www.oneirica.com/test_calendar/calendar.

As a non-programmer I'm really quite proud of this, although the coding style might be considered a little unorthodox ... but hey! it actually works and all in less than 5 hours too :) I can't think of a situation where this function (or something maybe a little more format-flexible but functionally very similar) would be inappropriate, as it handles only Timespan combination dates ... ?

Actually there's one little buggy - the hours and minutes are formatted as integers, so instead of 08:00 (hrs) I get 8:0 (hrs) ... :(
If anyone knows how to fix this annoying detail I'd love to hear from them.

karens’s picture

Project: Calendar » Date

This is actually a Date function, so I'm moving it.

sasconsul’s picture

Priority: Minor » Critical

Does this mean this patch will handle my problem with the Events module? Which is events that go from say 8:00pm to 12:30am (the next day) appear in two event and calendar boxes .

See http://www.bayareatango.org/d5 for an example, the "MILONGA @ a MUSE" goes from 8:00pm to 1:00am (the next day).

I was thinking that my problem could be solved by having an hour of the day that marks the beginning of a new day. For example I would set 'start-of-day' to 7:00am. This would allow me to have 'all-night' events that appear on only one calendar block.

For me this is important.

karens’s picture

Status: Active » Fixed

This should be fixed in the 5.2 version, which is not quite ready for an official release. You can see that release if you look for 'other releases' on the project page. Try it in a test environment, or be prepared to update it as bugs are found and fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.