Asposecpplib
System::Globalization::Details::GregorianCalendarUtils Class Referencefinal

Gregorian calendar utility functions. More...

Static Public Member Functions

static int GetDaysInYear (int year)
 Gets number of days in specific year. More...
 
static int GetDaysInMonth (int year, int month)
 Gets number of days in specific month. More...
 
static bool IsLeapYear (int year)
 Checks if the year is leap. More...
 
static bool IsLeapDay (int year, int month, int day)
 Checks if the day is leap. More...
 
static std::unique_ptr< icu::Calendar > CreateCalendar ()
 Create gregorian ICU calendar. More...
 

Static Public Attributes

static constexpr int MinYear = 1
 Min supported Gregorian year. More...
 
static constexpr int MaxYear = 9999
 Max supported Gregorian year. More...
 

Detailed Description

Gregorian calendar utility functions.

Member Function Documentation

◆ CreateCalendar()

static std::unique_ptr<icu::Calendar> System::Globalization::Details::GregorianCalendarUtils::CreateCalendar ( )
static

Create gregorian ICU calendar.

Returns
ICU calendar.

◆ GetDaysInMonth()

static int System::Globalization::Details::GregorianCalendarUtils::GetDaysInMonth ( int  year,
int  month 
)
static

Gets number of days in specific month.

Parameters
yearYear.
monthMonth.
Returns
Number of days in specified month of specified year.

◆ GetDaysInYear()

static int System::Globalization::Details::GregorianCalendarUtils::GetDaysInYear ( int  year)
static

Gets number of days in specific year.

Parameters
yearYear.
Returns
Number of days in specified year.

◆ IsLeapDay()

static bool System::Globalization::Details::GregorianCalendarUtils::IsLeapDay ( int  year,
int  month,
int  day 
)
static

Checks if the day is leap.

Parameters
yearYear.
monthMonth.
dayDay.
Returns
True if specified date is leap, false otherwise.

◆ IsLeapYear()

static bool System::Globalization::Details::GregorianCalendarUtils::IsLeapYear ( int  year)
static

Checks if the year is leap.

Parameters
yearYear.
Returns
True if specified year is leap, false otherwise.

Member Data Documentation

◆ MaxYear

constexpr int System::Globalization::Details::GregorianCalendarUtils::MaxYear = 9999
static

Max supported Gregorian year.

◆ MinYear

constexpr int System::Globalization::Details::GregorianCalendarUtils::MinYear = 1
static

Min supported Gregorian year.