CruiseDayIndexTag
struct CruiseDayIndexTag : LeafTag
Turns a Date into a indexed day of the cruise, with embarkation day being day 0. Used to get the day on which an event happens. This code counts “days’ as starting/ending at 3AM instead of midnight, as there are often after-midnight events but rarely 3AM events.
Usage: #cruiseDayIndex(date) returns 0…8
-
Declaration
Swift
func render(_ ctx: LeafContext) throws -> LeafData