mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-19 21:03:11 -07:00
Updated calendar strings to use the CalendarIdentifiers object
This commit is contained in:
parent
f8029942d4
commit
1bd4f1870c
1 changed files with 2 additions and 2 deletions
|
@ -284,9 +284,9 @@ DateTime DateCalculationEngine::AdjustCalendarDate(Windows::Foundation::DateTime
|
||||||
// It is not guaranteed that adding 1 year will always add 365 days in the Japanese Calendar.
|
// It is not guaranteed that adding 1 year will always add 365 days in the Japanese Calendar.
|
||||||
// To work around this quirk, we will change the calendar system to Gregorian before adding 1 year in the Japanese Calendar case only.
|
// To work around this quirk, we will change the calendar system to Gregorian before adding 1 year in the Japanese Calendar case only.
|
||||||
// We will then return the calendar system back to the Japanese Calendar.
|
// We will then return the calendar system back to the Japanese Calendar.
|
||||||
if (currentCalendarSystem == L"JapaneseCalendar")
|
if (currentCalendarSystem == CalendarIdentifiers::Japanese)
|
||||||
{
|
{
|
||||||
m_calendar->ChangeCalendarSystem(L"GregorianCalendar");
|
m_calendar->ChangeCalendarSystem(CalendarIdentifiers::Gregorian);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_calendar->AddYears(difference);
|
m_calendar->AddYears(difference);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue