Skip to main content

ical/prop/
calscale.rs

1//! # CALSCALE
2//!
3//! The `CALSCALE` property: the calendar scale the dates are read in,
4//! `GREGORIAN` in practice (RFC 5545 3.7.1).
5
6use crate::{
7    prop::{IcalPropKind, cardinality::IcalPropCardinality, spec::IcalPropSpec},
8    version::IcalVersion,
9};
10
11/// The `CALSCALE` property marker.
12pub struct CALSCALE;
13
14impl IcalPropSpec for CALSCALE {
15    const KIND: IcalPropKind = IcalPropKind::CalScale;
16
17    fn allowed_versions() -> &'static [IcalVersion] {
18        &[IcalVersion::V2_0]
19    }
20
21    fn cardinality(_version: IcalVersion) -> IcalPropCardinality {
22        IcalPropCardinality::AtMostOne
23    }
24}