Macaw.Data.Operations.Transforms.TimeParts (macaw_data v0.21.1)

View Source

time_parts (spec/04 §4.14): the named parts of each reading of the time field, each a new column of that name: year, quarter, month, iso_week, week (the week of the year, weeks starting on week_start, the week holding January 1 the first), weekday (1 the week_start day, Monday by default, so ISO's), day, day_of_year and hour. Every kind of time is read as the instant Macaw.Data.Source.Order.instant/1 places it (a NaiveDateTime its wall clock as UTC, a Date at its midnight), and its parts are its wall clock in time_zone: UTC by default, a fixed offset "+HH:MM" or "-HH:MM", or a zone the host's time-zone database names. No clock is read. A nil reading's parts are nil.