Kùzu C++ API
Loading...
Searching...
No Matches
kuzu::common::Date Class Reference

#include <date_t.h>

Static Public Member Functions

static KUZU_API date_t fromCString (const char *str, uint64_t len)
 
static KUZU_API std::string toString (date_t date)
 
static KUZU_API bool tryConvertDate (const char *buf, uint64_t len, uint64_t &pos, date_t &result)
 
static KUZU_API bool isLeapYear (int32_t year)
 
static KUZU_API bool isValid (int32_t year, int32_t month, int32_t day)
 
static KUZU_API void convert (date_t date, int32_t &out_year, int32_t &out_month, int32_t &out_day)
 
static KUZU_API date_t fromDate (int32_t year, int32_t month, int32_t day)
 
static KUZU_API bool parseDoubleDigit (const char *buf, uint64_t len, uint64_t &pos, int32_t &result)
 
static KUZU_API int32_t monthDays (int32_t year, int32_t month)
 
static KUZU_API std::string getDayName (date_t &date)
 
static KUZU_API std::string getMonthName (date_t &date)
 
static KUZU_API date_t getLastDay (date_t &date)
 
static KUZU_API int32_t getDatePart (DatePartSpecifier specifier, date_t &date)
 
static KUZU_API date_t trunc (DatePartSpecifier specifier, date_t &date)
 
static KUZU_API int64_t getEpochNanoSeconds (const date_t &date)
 

Static Public Attributes

static KUZU_API const int32_t NORMAL_DAYS [13]
 
static KUZU_API const int32_t CUMULATIVE_DAYS [13]
 
static KUZU_API const int32_t LEAP_DAYS [13]
 
static KUZU_API const int32_t CUMULATIVE_LEAP_DAYS [13]
 
static KUZU_API const int32_t CUMULATIVE_YEAR_DAYS [401]
 
static KUZU_API const int8_t MONTH_PER_DAY_OF_YEAR [365]
 
static KUZU_API const int8_t LEAP_MONTH_PER_DAY_OF_YEAR [366]
 
KUZU_API static constexpr const int32_t MIN_YEAR = -290307
 
KUZU_API static constexpr const int32_t MAX_YEAR = 294247
 
KUZU_API static constexpr const int32_t EPOCH_YEAR = 1970
 
KUZU_API static constexpr const int32_t YEAR_INTERVAL = 400
 
KUZU_API static constexpr const int32_t DAYS_PER_YEAR_INTERVAL = 146097
 
static constexpr const char * BC_SUFFIX = " (BC)"
 

Member Function Documentation

◆ convert()

static KUZU_API void kuzu::common::Date::convert ( date_t date,
int32_t & out_year,
int32_t & out_month,
int32_t & out_day )
static

◆ fromCString()

static KUZU_API date_t kuzu::common::Date::fromCString ( const char * str,
uint64_t len )
static

◆ fromDate()

static KUZU_API date_t kuzu::common::Date::fromDate ( int32_t year,
int32_t month,
int32_t day )
static

◆ getDatePart()

static KUZU_API int32_t kuzu::common::Date::getDatePart ( DatePartSpecifier specifier,
date_t & date )
static

◆ getDayName()

static KUZU_API std::string kuzu::common::Date::getDayName ( date_t & date)
static

◆ getEpochNanoSeconds()

static KUZU_API int64_t kuzu::common::Date::getEpochNanoSeconds ( const date_t & date)
static

◆ getLastDay()

static KUZU_API date_t kuzu::common::Date::getLastDay ( date_t & date)
static

◆ getMonthName()

static KUZU_API std::string kuzu::common::Date::getMonthName ( date_t & date)
static

◆ isLeapYear()

static KUZU_API bool kuzu::common::Date::isLeapYear ( int32_t year)
static

◆ isValid()

static KUZU_API bool kuzu::common::Date::isValid ( int32_t year,
int32_t month,
int32_t day )
static

◆ monthDays()

static KUZU_API int32_t kuzu::common::Date::monthDays ( int32_t year,
int32_t month )
static

◆ parseDoubleDigit()

static KUZU_API bool kuzu::common::Date::parseDoubleDigit ( const char * buf,
uint64_t len,
uint64_t & pos,
int32_t & result )
static

◆ toString()

static KUZU_API std::string kuzu::common::Date::toString ( date_t date)
static

◆ trunc()

static KUZU_API date_t kuzu::common::Date::trunc ( DatePartSpecifier specifier,
date_t & date )
static

◆ tryConvertDate()

static KUZU_API bool kuzu::common::Date::tryConvertDate ( const char * buf,
uint64_t len,
uint64_t & pos,
date_t & result )
static

Member Data Documentation

◆ BC_SUFFIX

const char* kuzu::common::Date::BC_SUFFIX = " (BC)"
staticconstexpr

◆ CUMULATIVE_DAYS

KUZU_API const int32_t kuzu::common::Date::CUMULATIVE_DAYS[13]
static

◆ CUMULATIVE_LEAP_DAYS

KUZU_API const int32_t kuzu::common::Date::CUMULATIVE_LEAP_DAYS[13]
static

◆ CUMULATIVE_YEAR_DAYS

KUZU_API const int32_t kuzu::common::Date::CUMULATIVE_YEAR_DAYS[401]
static

◆ DAYS_PER_YEAR_INTERVAL

KUZU_API static constexpr const int32_t kuzu::common::Date::DAYS_PER_YEAR_INTERVAL = 146097
staticconstexpr

◆ EPOCH_YEAR

KUZU_API static constexpr const int32_t kuzu::common::Date::EPOCH_YEAR = 1970
staticconstexpr

◆ LEAP_DAYS

KUZU_API const int32_t kuzu::common::Date::LEAP_DAYS[13]
static

◆ LEAP_MONTH_PER_DAY_OF_YEAR

KUZU_API const int8_t kuzu::common::Date::LEAP_MONTH_PER_DAY_OF_YEAR[366]
static

◆ MAX_YEAR

KUZU_API static constexpr const int32_t kuzu::common::Date::MAX_YEAR = 294247
staticconstexpr

◆ MIN_YEAR

KUZU_API static constexpr const int32_t kuzu::common::Date::MIN_YEAR = -290307
staticconstexpr

◆ MONTH_PER_DAY_OF_YEAR

KUZU_API const int8_t kuzu::common::Date::MONTH_PER_DAY_OF_YEAR[365]
static

◆ NORMAL_DAYS

KUZU_API const int32_t kuzu::common::Date::NORMAL_DAYS[13]
static

◆ YEAR_INTERVAL

KUZU_API static constexpr const int32_t kuzu::common::Date::YEAR_INTERVAL = 400
staticconstexpr

The documentation for this class was generated from the following file: