Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions components/calendar/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ pub struct DateFields<'a> {
pub day: Option<NonZeroU8>,
}

/// Information about the year. Returned by [`Date::year()`](crate::Date::year)
/// Information about the year.
///
/// Returned by [`Date::year()`](crate::Date::year).
///
/// This enum supports calendars based on eras as well as calendars based on cycles.
#[derive(Copy, Clone, Debug, PartialEq)]
Expand All @@ -55,7 +57,9 @@ pub enum YearInfo {
Era(EraYear),
/// Information about the year in calendars with cycles.
///
/// This is used in the Chinese and Dangi lunisolar calendars.
/// This is used by the [`LunarChinese`] calendar.
///
/// [`LunarChinese`]: crate::cal::LunarChinese
Cyclic(CyclicYear),
}

Expand Down Expand Up @@ -275,7 +279,9 @@ impl fmt::Display for MonthCode {
}
}

/// Representation of a formattable month. Returned by [`Date::month()`](crate::Date::month)
/// Representation of a formattable month.
///
/// Returned by [`Date::month()`](crate::Date::month).
#[derive(Copy, Clone, Debug, PartialEq)]
#[non_exhaustive]
pub struct MonthInfo {
Expand Down
5 changes: 2 additions & 3 deletions components/datetime/src/provider/neo/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,8 @@ size_test!(YearNames, year_names_v1_size, 32);
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
#[yoke(prove_covariance_manually)]
pub enum YearNames<'data> {
/// This calendar has a small, fixed set of eras with numeric years, this stores the era names in chronological order.
///
/// See [`EraYear`](icu_calendar::types::EraYear) for a definition of what chronological order is in this context.
/// This calendar has a small, fixed set of eras with numeric years. Eras are stored
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep the first sentence of a doc comment as its own paragraph.

/// according to their [era index](icu_calendar::types::EraYear::era_index).
FixedEras(#[cfg_attr(feature = "serde", serde(borrow))] VarZeroVec<'data, str>),
/// This calendar has a variable set of eras with numeric years, this stores the era names mapped from
/// era code to the name.
Expand Down