Define the all-day rule once as Event.HasTime

This commit is contained in:
tleininger committed 2026-09-24 10:08:04 +02:00
1 parent 31b114982e
commit 66bc76af1c
4 files changed
+87 -57

No files matched your search

+12
View File
@@ -68,4 +68,16 @@ public record Event
/// </summary>
[JsonPropertyName("public")]
public bool Public { get; init; }
/// <summary>
/// Gets a value indicating whether the event has a wall-clock time, as opposed
/// to being an all-day event.
/// </summary>
/// <remarks>
/// PocketBase has no all-day flag; the convention is that a start of 00:00
/// means all-day. This is the single definition of that rule -- formatting and
/// the calendar feed both read it here instead of re-deriving it.
/// </remarks>
[JsonIgnore]
public bool HasTime => Start.TimeOfDay != TimeSpan.Zero;
}