aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/i18n/indiancal.cpp
diff options
context:
space:
mode:
authormcheshkov <mcheshkov@yandex-team.ru>2022-02-10 16:46:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:15 +0300
commite9d19cec64684c9c1e6b0c98297e5b895cf904fe (patch)
tree2768b1223e96a8a0610a93d18425d9647c1123c8 /contrib/libs/icu/i18n/indiancal.cpp
parent60040c91ffe701a84689b2c6310ff845e65cff42 (diff)
downloadydb-e9d19cec64684c9c1e6b0c98297e5b895cf904fe.tar.gz
Restoring authorship annotation for <mcheshkov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/icu/i18n/indiancal.cpp')
-rw-r--r--contrib/libs/icu/i18n/indiancal.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/contrib/libs/icu/i18n/indiancal.cpp b/contrib/libs/icu/i18n/indiancal.cpp
index f1ab853b94..f66b44ffa7 100644
--- a/contrib/libs/icu/i18n/indiancal.cpp
+++ b/contrib/libs/icu/i18n/indiancal.cpp
@@ -1,4 +1,4 @@
-// © 2016 and later: Unicode, Inc. and others.
+// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
* Copyright (C) 2003-2014, International Business Machines Corporation
@@ -35,7 +35,7 @@ U_NAMESPACE_BEGIN
//-------------------------------------------------------------------------
-IndianCalendar* IndianCalendar::clone() const {
+IndianCalendar* IndianCalendar::clone() const {
return new IndianCalendar(*this);
}
@@ -348,14 +348,14 @@ IndianCalendar::inDaylightTime(UErrorCode& status) const
}
-/**
- * The system maintains a static default century start date and Year. They are
- * initialized the first time they are used. Once the system default century date
- * and year are set, they do not change.
- */
-static UDate gSystemDefaultCenturyStart = DBL_MIN;
-static int32_t gSystemDefaultCenturyStartYear = -1;
-static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
+/**
+ * The system maintains a static default century start date and Year. They are
+ * initialized the first time they are used. Once the system default century date
+ * and year are set, they do not change.
+ */
+static UDate gSystemDefaultCenturyStart = DBL_MIN;
+static int32_t gSystemDefaultCenturyStartYear = -1;
+static icu::UInitOnce gSystemDefaultCenturyInit = U_INITONCE_INITIALIZER;
UBool IndianCalendar::haveDefaultCentury() const
@@ -363,43 +363,43 @@ UBool IndianCalendar::haveDefaultCentury() const
return TRUE;
}
-static void U_CALLCONV
-initializeSystemDefaultCentury()
+static void U_CALLCONV
+initializeSystemDefaultCentury()
{
- // initialize systemDefaultCentury and systemDefaultCenturyYear based
- // on the current time. They'll be set to 80 years before
- // the current time.
- UErrorCode status = U_ZERO_ERROR;
-
- IndianCalendar calendar ( Locale ( "@calendar=Indian" ), status);
- if ( U_SUCCESS ( status ) ) {
- calendar.setTime ( Calendar::getNow(), status );
- calendar.add ( UCAL_YEAR, -80, status );
-
- UDate newStart = calendar.getTime ( status );
- int32_t newYear = calendar.get ( UCAL_YEAR, status );
-
- gSystemDefaultCenturyStart = newStart;
- gSystemDefaultCenturyStartYear = newYear;
- }
- // We have no recourse upon failure.
+ // initialize systemDefaultCentury and systemDefaultCenturyYear based
+ // on the current time. They'll be set to 80 years before
+ // the current time.
+ UErrorCode status = U_ZERO_ERROR;
+
+ IndianCalendar calendar ( Locale ( "@calendar=Indian" ), status);
+ if ( U_SUCCESS ( status ) ) {
+ calendar.setTime ( Calendar::getNow(), status );
+ calendar.add ( UCAL_YEAR, -80, status );
+
+ UDate newStart = calendar.getTime ( status );
+ int32_t newYear = calendar.get ( UCAL_YEAR, status );
+
+ gSystemDefaultCenturyStart = newStart;
+ gSystemDefaultCenturyStartYear = newYear;
+ }
+ // We have no recourse upon failure.
}
-
+
UDate
-IndianCalendar::defaultCenturyStart() const
+IndianCalendar::defaultCenturyStart() const
{
// lazy-evaluate systemDefaultCenturyStart
- umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury);
- return gSystemDefaultCenturyStart;
+ umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury);
+ return gSystemDefaultCenturyStart;
}
int32_t
-IndianCalendar::defaultCenturyStartYear() const
+IndianCalendar::defaultCenturyStartYear() const
{
// lazy-evaluate systemDefaultCenturyStartYear
- umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury);
- return gSystemDefaultCenturyStartYear;
+ umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury);
+ return gSystemDefaultCenturyStartYear;
}