Skip to content

Commit 2b33f9c

Browse files
committed
Rename LeapBase to Base
1 parent 016c46b commit 2b33f9c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

components/calendar/src/cal/east_asian_traditional.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ impl<R: Rules> Calendar for EastAsianTraditional<R> {
793793
fn month(&self, date: &Self::DateInner) -> types::MonthInfo {
794794
let mut m = types::MonthInfo::new(self, date.0);
795795
if date.0.year().packed.leap_month() == Some(m.ordinal + 1) {
796-
m.leap_status = types::LeapStatus::LeapBase;
796+
m.leap_status = types::LeapStatus::Base;
797797
}
798798
m
799799
}

components/calendar/src/cal/hebrew.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use calendrical_calculations::rata_die::RataDie;
4646
///
4747
/// In leap years (years 3, 6, 8, 11, 17, 19 in a 19-year cycle), the leap month Adar I (`M05L`, 30 days)
4848
/// is inserted before Adar (`M06`), which is then called Adar II ([`MonthInfo::leap_status`] will be
49-
/// [`LeapStatus::LeapBase`] to mark this).
49+
/// [`LeapStatus::Base`] to mark this).
5050
///
5151
/// Standard years thus have 353-355 days, and leap years 383-385.
5252
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq, PartialOrd, Ord, Default)]
@@ -359,7 +359,7 @@ impl Calendar for Hebrew {
359359
// Even though the leap month is modeled as M05L,
360360
// the actual leap base is M06.
361361
if m.number() == 6 && m.ordinal == 7 {
362-
m.leap_status = LeapStatus::LeapBase;
362+
m.leap_status = LeapStatus::Base;
363363
#[allow(deprecated)]
364364
{
365365
// This is an ICU4X invention, it's not needed by

components/calendar/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ pub enum LeapStatus {
534534
/// even though the Hebrew "Adar I" is `M05L`, the
535535
/// `LeapBase` will be `M06` (not `M05`), so formatting
536536
/// knows to produce "Adar II".
537-
LeapBase,
537+
Base,
538538
}
539539

540540
impl Month {

components/datetime/src/pattern/names.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3787,7 +3787,7 @@ impl RawDateTimeNamesBorrowed<'_> {
37873787
let num_months = leap_linear.len() / 2;
37883788
if month.leap_status() == LeapStatus::Leap {
37893789
leap_linear.get(month_index + num_months)
3790-
} else if month.leap_status() == LeapStatus::LeapBase
3790+
} else if month.leap_status() == LeapStatus::Base
37913791
&& month.number() < month.ordinal
37923792
{
37933793
// Detects Hebrew (base after leap) vs Chinese (base before leap).
@@ -3819,7 +3819,7 @@ impl RawDateTimeNamesBorrowed<'_> {
38193819
normal_name,
38203820
SinglePlaceholderPattern::from_ref_store(&data[data.len() - 2]).ok()?,
38213821
),
3822-
LeapStatus::LeapBase => MonthPlaceholderValue::StringPattern(
3822+
LeapStatus::Base => MonthPlaceholderValue::StringPattern(
38233823
normal_name,
38243824
SinglePlaceholderPattern::from_ref_store(&data[data.len() - 1]).ok()?,
38253825
),

0 commit comments

Comments
 (0)