Evaluate an iCalendar duration's day components before its hour components. Days are nominal calendar steps; hours are elapsed-time steps. Across a clock change, treating a day as twenty-four hours or reversing the component order can produce a different event end.
RFC 5545, September 2009, section 3.3.6, distinguishes nominal weeks and days from accurate hours, minutes and seconds. It requires the larger components to be added first, with days before hours. It also explains that a day's exact duration depends on its calendar position and clock discontinuities.
This is a narrow reading and calculation exercise using supplied time rules. It does not create a calendar entry, import a file, reserve a room or establish how a particular application processed a duration.
Retain the duration type and time basis
Do not replace the source token with a convenient total of seconds before evaluating it. P1D specifies one nominal day. PT24H specifies twenty-four hours. P1DT2H contains a nominal day followed by two hours. These fragments describe durations; they are not complete calendar files.
Start with the actual local start, its applicable time-zone reference, the duration and the relevant clock rules. If the event also contains another end specification, recurrence exception or a local time requiring special interpretation, examine that complete case separately. The examples below contain none of those additional conditions.
All event records, people, clock changes and findings that follow are fictional. Synthetic reference Z17 is not an IANA time zone. Its supplied rule is complete for these April 30–May 2, 2027 calculations: the offset is UTC+0 before May 1 at 02:00 UTC and UTC+1 afterward. There are no other changes in the interval.
At that transition, the local clock advances from just before 02:00 to 03:00. The local interval from 02:00 up to 03:00 on May 1 is absent. Every intermediate and final local time actually used below is outside that interval and has one supported UTC mapping. This exercise does not invent a rule for resolving a missing or ambiguous local timestamp.
Work one nominal day from noon
Event record E17-A starts at local 12:00 on April 30 in Z17 and has duration P1D. Session owner Nia's supplied intention is to end at the next date's local noon. Calendar coordinator Omar owns calculating the represented end and comparing it with that instruction.
The start is April 30 at 12:00 UTC because the starting offset is zero. Add the nominal day on the calendar: May 1 at local 12:00. Z17's offset there is UTC+1, so subtract one hour to obtain May 1 at 11:00 UTC.
From April 30 at 12:00 UTC to May 1 at 11:00 UTC is twenty-three elapsed hours. The represented end still has the intended local clock reading, noon, on the next date. The missing elapsed hour follows from the supplied clock change; it is not an omitted hour of the duration record.
| Source or candidate | Local end under Z17 | UTC end | Elapsed duration |
|---|---|---|---|
| E17-A: P1D from April 30 local 12:00 | May 1, 12:00 | May 1, 11:00 | 23 hours |
| Different candidate: PT24H from the same start | May 1, 13:00 | May 1, 12:00 | 24 hours |
The second row adds twenty-four hours to the starting UTC instant. Its end is May 1 at 12:00 UTC, which maps to local 13:00 after the offset change. It is a different duration, not another notation automatically equivalent to P1D.
A draft review flattens P1D into twenty-four hours and reports local 13:00. Omar rejects that result against the source token and Nia's next-noon instruction. He restores the nominal-day step and records local 12:00 / UTC 11:00 / twenty-three elapsed hours.
In the modeled recheck, Nia compares that represented end with her supplied local-noon goal and finds it matches. No calendar was edited and no event actually ended. If the actual intended requirement were twenty-four elapsed hours, that would need its own identified instruction rather than a silent change of the source meaning.
Add the day before the two hours
Use an independent record E17-B, not a continuation of E17-A. Its start is April 30 at local 01:30 in Z17, and its duration is P1DT2H. The starting offset is zero, so the start is also April 30 at 01:30 UTC.
First add the nominal day. The intermediate point is May 1 at local 01:30. That is before the supplied clock jump and still has offset zero: May 1 at 01:30 UTC. This particular nominal-day step spans twenty-four elapsed hours because its end precedes the transition.
Now add the two elapsed hours to that intermediate instant. May 1 at 01:30 UTC plus two hours is May 1 at 03:30 UTC. The new offset is UTC+1, giving local 04:30. E17-B's total elapsed duration is twenty-six hours.
| Step | Local point | UTC point | Elapsed from original start |
|---|---|---|---|
| Supplied start | April 30, 01:30 | April 30, 01:30 | 0 hours |
| Add one nominal day | May 1, 01:30 | May 1, 01:30 | 24 hours |
| Then add two elapsed hours | May 1, 04:30 | May 1, 03:30 | 26 hours |
Do not reuse DR17-A's twenty-three-hour day as a universal conversion for the day component here. The two starts occupy different positions relative to the clock change. Each nominal step needs its own dated mapping.
Expose the reversed order
A competing calculation adds the two hours first. From April 30 at 01:30 UTC it reaches April 30 at 03:30 UTC, also local 03:30 before the next day's change. It then adds a nominal calendar day to reach May 1 at local 03:30.
At that final point the offset is UTC+1, so the reversed calculation ends at May 1 at 02:30 UTC. It has produced local 03:30 and twenty-five elapsed hours, one hour earlier than the specified day-first evaluation.
Both calculations appear to use one day and two hours. Their order changes which nominal-day interval crosses the discontinuity. The source's evaluation order therefore matters; it is not merely a preference for displaying large units first.
DR17-B preserves the rejected hours-first trace, then repeats the day-first sequence: local May 1 01:30, UTC 01:30; add two elapsed hours; UTC 03:30, local 04:30. The corrected end is supported by the supplied Z17 rule and source order. That is a paper calculation, not an observation of calendar software.
Hold an end with no applicable clock rule
In another branch, the packet retains E17-A's local start and P1D token but does not supply the applicable dated zone rule. A label saying Z17 in an export is not the missing transition evidence. Omar cannot choose the zero offset throughout or copy a rule from a similarly named zone to manufacture an exact end instant.
The open record names E17-A, the source duration, the missing applicable rule and the consequence: exact end instant and elapsed hours unestablished. Omar owns obtaining the identified time reference and relevant transitions. Nia owns confirming that the source record is the event she intends to use. The exact-end conclusion remains held until the complete evaluation can be repeated.
If a real intermediate local timestamp is absent or ambiguous, this finite exercise does not resolve it by selecting the more convenient offset. Keep that interpretation with the complete time rules and responsible technical review. A neat total of seconds cannot replace an unestablished calendar mapping.
The completed DR17 records both meanings and their order: P1D from the supplied noon ends at next local noon with twenty-three elapsed hours; PT24H ends at local 13:00; E17-B's day-first P1DT2H ends at local 04:30, while the rejected reverse order ends at 03:30. Keep the original start, duration, time-rule basis, intermediate point and local/UTC end together so another reader can reproduce the result without assuming every calendar day has the same elapsed length.
Explore Infinite Upside
For Vijay Sheth’s personal accounts, read Infinite Upside: Building Wealth With Room to Live, published by Sheth Capital, Inc.
Keep reading with the book.
Reader’s Guide