class Inti::Date

Name

class Inti::Date -- 

Synopsis

class Inti::Date is declared in the header inti/timedate.h.

Superclasses. none

Subclasses. none

Class members

Public Enumerations.
enum Weekday
enum Month

Public Constructors.
Date ()
Date (unsigned int day, Month m, unsigned int year)

Public Methods.
bool valid () const
Weekday weekday () const
unsigned int julian () const
unsigned int year () const
unsigned int day () const
Month month () const
unsigned int day_of_year () const
unsigned int monday_week_of_year () const
unsigned int sunday_week_of_year () const
bool first_of_month () const
bool last_of_month () const
void parse (const ustring & text)
void parse (const char * text)
void set_time (GTime t)
void set_month (Month m)
void set_day (unsigned int day)
void set_year (unsigned int year)
void set_dmy (unsigned int day, Month m, unsigned int year)
void set_julian (unsigned int julian)
void add_days (unsigned int n_days)
void subtract_days (unsigned int n_days)
void add_months (unsigned int n_months)
void subtract_months (unsigned int n_months)
void add_years (unsigned int n_years)
void subtract_years (unsigned int n_years)
bool operator== (const Date & rhs) const
bool operator!= (const Date & rhs) const
bool operator< (const Date & rhs) const
bool operator<= (const Date & rhs) const
bool operator> (const Date & rhs) const
bool operator>= (const Date & rhs) const
void to_struct_tm (struct tm * tm)
ustring strftime (const string & format)
ustring strftime (const char * format)

Public Functions.
bool valid_day (unsigned int day)
bool valid_month (Month m)
bool valid_year (unsigned int year)
bool valid_weekday (Weekday w)
bool valid_julian (unsigned int julian)
bool valid_dmy (unsigned int day, Month m, unsigned int year)
bool leap_year (unsigned int year)
unsigned int days_in_month (Month m, unsigned int year)
unsigned int monday_weeks_in_year (unsigned int year)
unsigned int sunday_weeks_in_year (unsigned int year)

Description

Public Enumerations

enum Inti::Date::Weekday

INVALID_WEEKDAY 
MONDAY 
TUESDAY 
WEDNESDAY 
THURSDAY 
FRIDAY 
SATURDAY 
SUNDAY 

enum Inti::Date::Month

INVALID_MONTH 
JANUARY 
FEBRUARY 
MARCH 
APRIL 
MAY 
JUNE 
JULY 
AUGUST 
SEPTEMBER 
OCTOBER 
NOVEMBER 
DECEMBER 

Public Constructors

method Inti::Date::Date

Date ()

method Inti::Date::Date

Date (unsigned int day, Month m, unsigned int year)

day 
m 
year 

Public Methods

method Inti::Date::valid

bool valid () const

method Inti::Date::weekday

Weekday weekday () const

method Inti::Date::julian

unsigned int julian () const

method Inti::Date::year

unsigned int year () const

method Inti::Date::day

unsigned int day () const

method Inti::Date::month

Month month () const

method Inti::Date::day_of_year

unsigned int day_of_year () const

method Inti::Date::monday_week_of_year

unsigned int monday_week_of_year () const

method Inti::Date::sunday_week_of_year

unsigned int sunday_week_of_year () const

method Inti::Date::first_of_month

bool first_of_month () const

method Inti::Date::last_of_month

bool last_of_month () const

method Inti::Date::parse

void parse (const ustring & text)

text 

method Inti::Date::parse

void parse (const char * text)

text 

method Inti::Date::set_time

void set_time (GTime t)

t 

method Inti::Date::set_month

void set_month (Month m)

m 

method Inti::Date::set_day

void set_day (unsigned int day)

day 

method Inti::Date::set_year

void set_year (unsigned int year)

year 

method Inti::Date::set_dmy

void set_dmy (unsigned int day, Month m, unsigned int year)

day 
m 
year 

method Inti::Date::set_julian

void set_julian (unsigned int julian)

julian 

method Inti::Date::add_days

void add_days (unsigned int n_days)

n_days 

method Inti::Date::subtract_days

void subtract_days (unsigned int n_days)

n_days 

method Inti::Date::add_months

void add_months (unsigned int n_months)

n_months 

method Inti::Date::subtract_months

void subtract_months (unsigned int n_months)

n_months 

method Inti::Date::add_years

void add_years (unsigned int n_years)

n_years 

method Inti::Date::subtract_years

void subtract_years (unsigned int n_years)

n_years 

method Inti::Date::operator==

bool operator== (const Date & rhs) const

rhs 

method Inti::Date::operator!=

bool operator!= (const Date & rhs) const

rhs 

method Inti::Date::operator<

bool operator< (const Date & rhs) const

rhs 

method Inti::Date::operator<=

bool operator<= (const Date & rhs) const

rhs 

method Inti::Date::operator>

bool operator> (const Date & rhs) const

rhs 

method Inti::Date::operator>=

bool operator>= (const Date & rhs) const

rhs 

method Inti::Date::to_struct_tm

void to_struct_tm (struct tm * tm)

tm 

method Inti::Date::strftime

ustring strftime (const string & format)

format 

method Inti::Date::strftime

ustring strftime (const char * format)

format 

Public Functions

function Inti::Date::valid_day

bool valid_day (unsigned int day)

day 

function Inti::Date::valid_month

bool valid_month (Month m)

m 

function Inti::Date::valid_year

bool valid_year (unsigned int year)

year 

function Inti::Date::valid_weekday

bool valid_weekday (Weekday w)

w 

function Inti::Date::valid_julian

bool valid_julian (unsigned int julian)

julian 

function Inti::Date::valid_dmy

bool valid_dmy (unsigned int day, Month m, unsigned int year)

day 
m 
year 

function Inti::Date::leap_year

bool leap_year (unsigned int year)

year 

function Inti::Date::days_in_month

unsigned int days_in_month (Month m, unsigned int year)

m 
year 

function Inti::Date::monday_weeks_in_year

unsigned int monday_weeks_in_year (unsigned int year)

year 

function Inti::Date::sunday_weeks_in_year

unsigned int sunday_weeks_in_year (unsigned int year)

year 

Public Variables

variable Inti::Date::INVALID_JULIAN

static const unsigned int INVALID_JULIAN

variable Inti::Date::INVALID_DAY

static const unsigned int INVALID_DAY

variable Inti::Date::INVALID_YEAR

static const unsigned int INVALID_YEAR