chromium/third_party/icu/source/i18n/erarules.cpp

// © 2018 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html

#include <utility>

#include "unicode/utypes.h"

#if !UCONFIG_NO_FORMATTING

#include <stdlib.h>
#include "unicode/ucal.h"
#include "unicode/ures.h"
#include "unicode/ustring.h"
#include "unicode/timezone.h"
#include "cmemory.h"
#include "cstring.h"
#include "erarules.h"
#include "gregoimp.h"
#include "uassert.h"

U_NAMESPACE_BEGIN

static const int32_t MAX_ENCODED_START_YEAR =;
static const int32_t MIN_ENCODED_START_YEAR =;
static const int32_t MIN_ENCODED_START =;   // encodeDate(MIN_ENCODED_START_YEAR, 1, 1, ...);

static const int32_t YEAR_MASK =;
static const int32_t MONTH_MASK =;
static const int32_t DAY_MASK =;

static const int32_t MAX_INT32 =;
static const int32_t MIN_INT32 =;

static const char16_t VAL_FALSE[] =;    // "false"
static const char16_t VAL_FALSE_LEN =;

static UBool isSet(int startDate) {}

static UBool isValidRuleStartDate(int32_t year, int32_t month, int32_t day) {}

/**
 * Encode year/month/date to a single integer.
 * year is high 16 bits (-32768 to 32767), month is
 * next 8 bits and day of month is last 8 bits.
 *
 * @param year  year
 * @param month month (1-base)
 * @param day   day of month
 * @return  an encoded date.
 */
static int32_t encodeDate(int32_t year, int32_t month, int32_t day) {}

static void decodeDate(int32_t encodedDate, int32_t (&fields)[3]) {}

/**
 * Compare an encoded date with another date specified by year/month/day.
 * @param encoded   An encoded date
 * @param year      Year of another date
 * @param month     Month of another date
 * @param day       Day of another date
 * @return -1 when encoded date is earlier, 0 when two dates are same,
 *          and 1 when encoded date is later.
 */
static int32_t compareEncodedDateWithYMD(int encoded, int year, int month, int day) {}

EraRules::EraRules(LocalMemory<int32_t>& eraStartDates, int32_t numEras)
    :{}

EraRules::~EraRules() {}

EraRules* EraRules::createInstance(const char *calType, UBool includeTentativeEra, UErrorCode& status) {}

void EraRules::getStartDate(int32_t eraIdx, int32_t (&fields)[3], UErrorCode& status) const {}

int32_t EraRules::getStartYear(int32_t eraIdx, UErrorCode& status) const {}

int32_t EraRules::getEraIndex(int32_t year, int32_t month, int32_t day, UErrorCode& status) const {}

void EraRules::initCurrentEra() {}

U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */