tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

DateTimeFormatUtils.h (862B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 #ifndef intl_components_DateTimeFormatUtils_h_
      5 #define intl_components_DateTimeFormatUtils_h_
      6 #include "unicode/udat.h"
      7 
      8 #if !MOZ_SYSTEM_ICU
      9 #  include "unicode/calendar.h"
     10 #endif
     11 
     12 #include "mozilla/Result.h"
     13 #include "mozilla/UniquePtr.h"
     14 #include "mozilla/intl/DateTimePart.h"
     15 #include "mozilla/intl/ICUError.h"
     16 
     17 namespace mozilla::intl {
     18 DateTimePartType ConvertUFormatFieldToPartType(UDateFormatField fieldName);
     19 
     20 Result<Ok, ICUError> ApplyCalendarOverride(UDateFormat* aDateFormat);
     21 
     22 #if !MOZ_SYSTEM_ICU
     23 Result<UniquePtr<icu::Calendar>, ICUError> CreateCalendarOverride(
     24    const icu::Calendar* calendar);
     25 #endif
     26 }  // namespace mozilla::intl
     27 
     28 #endif