Skip to main content

date_component

Function date_component 

Source
pub fn date_component(epoch_day: i64, prop: &str) -> Option<i64>
Expand description

d.<prop> component access for a Date – the “forward” (date -> components) half of ISO week/quarter calendar math; the “backward” half (week/dayOfWeek/quarter/dayOfQuarter/ordinalDay -> date) lives in epoch_day_from_week_fields/epoch_day_from_ordinal_ fields/epoch_day_from_quarter_fields below. Returns None for any property name this doesn’t recognize (the caller treats that the same as a missing property, matching every other .prop access in this codebase).