Pergunta

I created event in iCalendar. Its start date is today and end date is next month 15th. and this is recurrence type of event . so if set event as recurrence event then changed end date as same as recurrence end date. I want to give time duration of event,like 3.30P.M to 6.30P.M. How to i set event duration ....

 "DTSTART;TZID=US-Eastern:19970105T083000 
RRULE:FREQ=YEARLY;INTERVAL=2;BYMONTH=1;BYDAY=SU;BYHOUR=8,9; BYMINUTE=30

First, the "INTERVAL=2" would be applied to "FREQ=YEARLY" to arrive at "every other year".

Then, "BYMONTH=1" would be applied to arrive at "every January, every other year".

Then, "BYDAY=SU" would be applied to arrive at "every Sunday in January, every other year".

Then, "BYHOUR=8,9" would be applied to arrive at "every Sunday in January at 8 AM and 9 AM, every other year".

Then, "BYMINUTE=30" would be applied to arrive at "every Sunday in January at 8:30 AM and 9:30 AM, every other year".

Then, lacking information from RRULE, the second is derived from DTSTART, to end up in "every Sunday in January at 8:30:00 AM and 9:30:00 AM, every other year".

Similarly, if the BYMINUTE, BYHOUR, BYDAY, BYMONTHDAY or BYMONTH rule part were missing, the appropriate minute, hour, day or month would have been retrieved from the "DTSTART" property."

Please any one guide me how to set ... I know how to recurrence rule is working but my question is how to set event duration.

Foi útil?

Solução

No client that I know of support BYMINUTE and BYHOUR so unless this event is for your own application consumption, you are asking for trouble. IN any case, the very first instance will use the DTSTART value as the beginning, regardless of what you may have put in BYMINUTE and BYHOUR (see https://www.rfc-editor.org/rfc/rfc5545#section-3.8.5.3)

Then you can use DTEND or DURATION:

DTSTART;TZID=US-Eastern:19970105T083000 DTEND;TZID=US-Eastern:19970105T153000

or

DTSTART;TZID=US-Eastern:19970105T083000 DURATION:PT7H

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top