Logo Search packages:      
Sourcecode: ardour version File versions  Download package

Glib::Date Class Reference

#include <date.h>

List of all members.


Detailed Description

Julian calendar date.

Definition at line 42 of file date.h.


Public Types

typedef guint8 Day
enum  DMY { DAY, MONTH, YEAR }
enum  Month {
  BAD_MONTH, JANUARY, FEBRUARY, MARCH,
  APRIL, MAY, JUNE, JULY,
  AUGUST, SEPTEMBER, OCTOBER, NOVEMBER,
  DECEMBER
}
enum  Weekday {
  BAD_WEEKDAY, MONDAY, TUESDAY, WEDNESDAY,
  THURSDAY, FRIDAY, SATURDAY, SUNDAY
}
typedef guint16 Year

Public Member Functions

Dateadd_days (int n_days)
Dateadd_months (int n_months)
Dateadd_years (int n_years)
Dateclamp (const Date &min_date, const Date &max_date)
Dateclamp_max (const Date &max_date)
Dateclamp_min (const Date &min_date)
void clear ()
int compare (const Date &rhs) const
 Date (const GDate &castitem)
 Date (guint32 julian_day)
 Date (Day day, Month month, Year year)
int days_between (const Date &rhs) const
Glib::ustring format_string (const Glib::ustring &format) const
Day get_day () const
unsigned int get_day_of_year () const
guint32 get_julian () const
unsigned int get_monday_week_of_year () const
Month get_month () const
unsigned int get_sunday_week_of_year () const
Weekday get_weekday () const
Year get_year () const
const GDate * gobj () const
GDate * gobj ()
bool is_first_of_month () const
bool is_last_of_month () const
void order (Date &other)
void set_day (Day day)
void set_dmy (Day day, Month month, Year year)
void set_julian (guint32 julian_day)
void set_month (Month month)
void set_parse (const Glib::ustring &str)
void set_time (GTime time)
void set_year (Year year)
Datesubtract_days (int n_days)
Datesubtract_months (int n_months)
Datesubtract_years (int n_years)
void to_struct_tm (struct tm &dest) const
bool valid () const

Static Public Member Functions

static guint8 get_days_in_month (Month month, Year year)
static guint8 get_monday_weeks_in_year (Year year)
static guint8 get_sunday_weeks_in_year (Year year)
static bool is_leap_year (Year year)
static bool valid_day (Day day)
static bool valid_dmy (Day day, Month month, Year year)
static bool valid_julian (guint32 julian_day)
static bool valid_month (Month month)
static bool valid_weekday (Weekday weekday)
static bool valid_year (Year year)

Static Public Attributes

static const Day BAD_DAY = 0
static const guint32 BAD_JULIAN = 0
static const Year BAD_YEAR = 0

Private Attributes

GDate gobject_

Related Functions

(Note that these are not member functions.)

bool operator!= (const Date &lhs, const Date &rhs)
bool operator< (const Date &lhs, const Date &rhs)
bool operator<= (const Date &lhs, const Date &rhs)
bool operator== (const Date &lhs, const Date &rhs)
bool operator> (const Date &lhs, const Date &rhs)
bool operator>= (const Date &lhs, const Date &rhs)

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

Generated by  Doxygen 1.6.0   Back to index