Closed Bug 156113 Opened 23 years ago Closed 23 years ago

Calendar should use VALUE=DATE parameter for all-day events instead of X prop

Categories

(Calendar :: Internal Components, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ajbu, Assigned: mostafah)

Details

Attachments

(2 files)

I was almost sure I entered this before, but can't find it.. Currently Calendar uses a X property to specify an allday event, and sets : X ;MEMBER=AllDay :TRUE DTSTART :20020429T000000 DTEND :20020429T235900 It would be better to use the VALUE parameter DATE to specify the allday event From the iTip rfc: 4.1.5 Anniversaries or Events attached to entire days This example demonstrates the use of the "value" parameter to tie a "VEVENT" to day rather than a specific time. BEGIN:VCALENDAR PRODID:-//ACME/DesktopCalendar//EN METHOD:PUBLISH VERSION:2.0 BEGIN:VEVENT ORGANIZER:mailto:a@example.com DTSTAMP:19970614T190000Z UID:0981234-1234234-23@example.com DTSTART;VALUE=DATE:19970714 RRULE:FREQ=YEARLY;INTERVAL=1 SUMMARY: Bastille Day END:VEVENT END:VCALENDAR
This should be very easy to do, the icaltimetype has a property is_date. setting if(m_allday) m_datetime.isdate = 1 should be enough to store an alldate event for iCalendar.
Patch that writes m_allday boolean in the DTSTART value. DTSTART of an allday event becomes: DTSTART ;VALUE=DATE :20020708 Parser is still reading the X allday property, so importing holidays still works. X property is no longer written. When allday is true, DTEND is no longer written.
This is for Mostafa.
Assignee: mikep → mostafah
Status: UNCONFIRMED → NEW
Ever confirmed: true
Throughout the code the assumption is that the m_datetime variable is a complete datettime value specially in the recurrence calculating code. So the previous patch needs to be revised to make sure this assumption is kept true. I will attach the revised patch and wait for Arentjan to comment on it.
New patch looks good to me.
Fixed in CVS
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Patch in CVS has a typo, 'is_date == false' should be 'is_date = false' + m_start->m_datetime.is_date == false; //Because currently we depend on m_datetime being a complete datetime
Default QA Contact for Calendar has changed. If you wish to remain the QA contact for this bug, feel free to change it back.
QA Contact: colint → brantgurganus2001
Mass move of libxpical bugs to the Internal Components, per ctalbert.
Component: libxpical → Internal Components
The bugspam monkeys have been set free and are feeding on Calendar :: Internal Components. Be afraid for your sanity!
QA Contact: gurganbl → base
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: