Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gdate.h File Reference
#include <time.h>
#include <glib/gtypes.h>
#include <glib/gquark.h>

Go to the source code of this file.

Data Structures

struct  _GDate
 

Macros

#define G_DATE_BAD_JULIAN   0U
 
#define G_DATE_BAD_DAY   0U
 
#define G_DATE_BAD_YEAR   0U
 
#define g_date_weekday   g_date_get_weekday GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_weekday)
 
#define g_date_month   g_date_get_month GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_month)
 
#define g_date_year   g_date_get_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_year)
 
#define g_date_day   g_date_get_day GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_day)
 
#define g_date_julian   g_date_get_julian GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_julian)
 
#define g_date_day_of_year   g_date_get_day_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_day_of_year)
 
#define g_date_monday_week_of_year   g_date_get_monday_week_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_monday_week_of_year)
 
#define g_date_sunday_week_of_year   g_date_get_sunday_week_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_sunday_week_of_year)
 
#define g_date_days_in_month   g_date_get_days_in_month GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_days_in_month)
 
#define g_date_monday_weeks_in_year   g_date_get_monday_weeks_in_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_monday_weeks_in_year)
 
#define g_date_sunday_weeks_in_year   g_date_get_sunday_weeks_in_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_sunday_weeks_in_year)
 

Typedefs

typedef guint16 GDateYear
 
typedef guint8 GDateDay
 
typedef struct _GDate GDate
 

Enumerations

enum  GDateDMY { G_DATE_DAY = 0 , G_DATE_MONTH = 1 , G_DATE_YEAR = 2 }
 
enum  GDateWeekday {
  G_DATE_BAD_WEEKDAY = 0 , G_DATE_MONDAY = 1 , G_DATE_TUESDAY = 2 , G_DATE_WEDNESDAY = 3 ,
  G_DATE_THURSDAY = 4 , G_DATE_FRIDAY = 5 , G_DATE_SATURDAY = 6 , G_DATE_SUNDAY = 7
}
 
enum  GDateMonth {
  G_DATE_BAD_MONTH = 0 , G_DATE_JANUARY = 1 , G_DATE_FEBRUARY = 2 , G_DATE_MARCH = 3 ,
  G_DATE_APRIL = 4 , G_DATE_MAY = 5 , G_DATE_JUNE = 6 , G_DATE_JULY = 7 ,
  G_DATE_AUGUST = 8 , G_DATE_SEPTEMBER = 9 , G_DATE_OCTOBER = 10 , G_DATE_NOVEMBER = 11 ,
  G_DATE_DECEMBER = 12
}
 

Functions

G_BEGIN_DECLS typedef gint32 GTime GLIB_DEPRECATED_TYPE_IN_2_62_FOR (GDateTime)
 
GLIB_AVAILABLE_IN_ALL GDateg_date_new (void)
 
GLIB_AVAILABLE_IN_ALL GDateg_date_new_dmy (GDateDay day, GDateMonth month, GDateYear year)
 
GLIB_AVAILABLE_IN_ALL GDateg_date_new_julian (guint32 julian_day)
 
GLIB_AVAILABLE_IN_ALL void g_date_free (GDate *date)
 
GLIB_AVAILABLE_IN_2_56 GDateg_date_copy (const GDate *date)
 
GLIB_AVAILABLE_IN_ALL gboolean g_date_valid (const GDate *date)
 
GLIB_AVAILABLE_IN_ALL gboolean g_date_valid_day (GDateDay day) G_GNUC_CONST
 
GLIB_AVAILABLE_IN_ALL gboolean g_date_valid_month (GDateMonth month) G_GNUC_CONST
 
GLIB_AVAILABLE_IN_ALL gboolean g_date_valid_year (GDateYear year) G_GNUC_CONST
 
GLIB_AVAILABLE_IN_ALL gboolean g_date_valid_weekday (GDateWeekday weekday) G_GNUC_CONST
 
GLIB_AVAILABLE_IN_ALL gboolean g_date_valid_julian (guint32 julian_date) G_GNUC_CONST
 
GLIB_AVAILABLE_IN_ALL gboolean g_date_valid_dmy (GDateDay day, GDateMonth month, GDateYear year) G_GNUC_CONST
 
GLIB_AVAILABLE_IN_ALL GDateWeekday g_date_get_weekday (const GDate *date)
 
GLIB_AVAILABLE_IN_ALL GDateMonth g_date_get_month (const GDate *date)
 
GLIB_AVAILABLE_IN_ALL GDateYear g_date_get_year (const GDate *date)
 
GLIB_AVAILABLE_IN_ALL GDateDay g_date_get_day (const GDate *date)
 
GLIB_AVAILABLE_IN_ALL guint32 g_date_get_julian (const GDate *date)
 
GLIB_AVAILABLE_IN_ALL guint g_date_get_day_of_year (const GDate *date)
 
GLIB_AVAILABLE_IN_ALL guint g_date_get_monday_week_of_year (const GDate *date)
 
GLIB_AVAILABLE_IN_ALL guint g_date_get_sunday_week_of_year (const GDate *date)
 
GLIB_AVAILABLE_IN_ALL guint g_date_get_iso8601_week_of_year (const GDate *date)
 
GLIB_AVAILABLE_IN_ALL void g_date_clear (GDate *date, guint n_dates)
 
GLIB_AVAILABLE_IN_ALL void g_date_set_parse (GDate *date, const gchar *str)
 
GLIB_AVAILABLE_IN_ALL void g_date_set_time_t (GDate *date, time_t timet)
 
G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_date_set_time_val (GDate *date, GTimeVal *timeval)
 
void g_date_set_time (GDate *date, GTime time_)
 
G_GNUC_END_IGNORE_DEPRECATIONS GLIB_AVAILABLE_IN_ALL void g_date_set_month (GDate *date, GDateMonth month)
 
GLIB_AVAILABLE_IN_ALL void g_date_set_day (GDate *date, GDateDay day)
 
GLIB_AVAILABLE_IN_ALL void g_date_set_year (GDate *date, GDateYear year)
 
GLIB_AVAILABLE_IN_ALL void g_date_set_dmy (GDate *date, GDateDay day, GDateMonth month, GDateYear y)
 
GLIB_AVAILABLE_IN_ALL void g_date_set_julian (GDate *date, guint32 julian_date)
 
GLIB_AVAILABLE_IN_ALL gboolean g_date_is_first_of_month (const GDate *date)
 
GLIB_AVAILABLE_IN_ALL gboolean g_date_is_last_of_month (const GDate *date)
 
GLIB_AVAILABLE_IN_ALL void g_date_add_days (GDate *date, guint n_days)
 
GLIB_AVAILABLE_IN_ALL void g_date_subtract_days (GDate *date, guint n_days)
 
GLIB_AVAILABLE_IN_ALL void g_date_add_months (GDate *date, guint n_months)
 
GLIB_AVAILABLE_IN_ALL void g_date_subtract_months (GDate *date, guint n_months)
 
GLIB_AVAILABLE_IN_ALL void g_date_add_years (GDate *date, guint n_years)
 
GLIB_AVAILABLE_IN_ALL void g_date_subtract_years (GDate *date, guint n_years)
 
GLIB_AVAILABLE_IN_ALL gboolean g_date_is_leap_year (GDateYear year) G_GNUC_CONST
 
GLIB_AVAILABLE_IN_ALL guint8 g_date_get_days_in_month (GDateMonth month, GDateYear year) G_GNUC_CONST
 
GLIB_AVAILABLE_IN_ALL guint8 g_date_get_monday_weeks_in_year (GDateYear year) G_GNUC_CONST
 
GLIB_AVAILABLE_IN_ALL guint8 g_date_get_sunday_weeks_in_year (GDateYear year) G_GNUC_CONST
 
GLIB_AVAILABLE_IN_ALL gint g_date_days_between (const GDate *date1, const GDate *date2)
 
GLIB_AVAILABLE_IN_ALL gint g_date_compare (const GDate *lhs, const GDate *rhs)
 
GLIB_AVAILABLE_IN_ALL void g_date_to_struct_tm (const GDate *date, struct tm *tm)
 
GLIB_AVAILABLE_IN_ALL void g_date_clamp (GDate *date, const GDate *min_date, const GDate *max_date)
 
GLIB_AVAILABLE_IN_ALL void g_date_order (GDate *date1, GDate *date2)
 
GLIB_AVAILABLE_IN_ALL gsize g_date_strftime (gchar *s, gsize slen, const gchar *format, const GDate *date)
 

Macro Definition Documentation

◆ G_DATE_BAD_DAY

#define G_DATE_BAD_DAY   0U

Definition at line 84 of file gdate.h.

◆ G_DATE_BAD_JULIAN

#define G_DATE_BAD_JULIAN   0U

Definition at line 83 of file gdate.h.

◆ G_DATE_BAD_YEAR

#define G_DATE_BAD_YEAR   0U

Definition at line 85 of file gdate.h.

◆ g_date_day

Definition at line 289 of file gdate.h.

◆ g_date_day_of_year

Definition at line 291 of file gdate.h.

◆ g_date_days_in_month

Definition at line 294 of file gdate.h.

◆ g_date_julian

Definition at line 290 of file gdate.h.

◆ g_date_monday_week_of_year

Definition at line 292 of file gdate.h.

◆ g_date_monday_weeks_in_year

Definition at line 295 of file gdate.h.

◆ g_date_month

Definition at line 287 of file gdate.h.

◆ g_date_sunday_week_of_year

Definition at line 293 of file gdate.h.

◆ g_date_sunday_weeks_in_year

Definition at line 296 of file gdate.h.

◆ g_date_weekday

Definition at line 286 of file gdate.h.

◆ g_date_year

Definition at line 288 of file gdate.h.

Typedef Documentation

◆ GDate

typedef struct _GDate GDate

Definition at line 44 of file gdate.h.

◆ GDateDay

typedef guint8 GDateDay

Definition at line 43 of file gdate.h.

◆ GDateYear

typedef guint16 GDateYear

Definition at line 42 of file gdate.h.

Enumeration Type Documentation

◆ GDateDMY

enum GDateDMY
Enumerator
G_DATE_DAY 
G_DATE_MONTH 
G_DATE_YEAR 

Definition at line 47 of file gdate.h.

48{
49 G_DATE_DAY = 0,
50 G_DATE_MONTH = 1,
51 G_DATE_YEAR = 2
52} GDateDMY;
GDateDMY
Definition gdate.h:48
@ G_DATE_DAY
Definition gdate.h:49
@ G_DATE_MONTH
Definition gdate.h:50
@ G_DATE_YEAR
Definition gdate.h:51

◆ GDateMonth

enum GDateMonth
Enumerator
G_DATE_BAD_MONTH 
G_DATE_JANUARY 
G_DATE_FEBRUARY 
G_DATE_MARCH 
G_DATE_APRIL 
G_DATE_MAY 
G_DATE_JUNE 
G_DATE_JULY 
G_DATE_AUGUST 
G_DATE_SEPTEMBER 
G_DATE_OCTOBER 
G_DATE_NOVEMBER 
G_DATE_DECEMBER 

Definition at line 66 of file gdate.h.

67{
71 G_DATE_MARCH = 3,
72 G_DATE_APRIL = 4,
73 G_DATE_MAY = 5,
74 G_DATE_JUNE = 6,
75 G_DATE_JULY = 7,
76 G_DATE_AUGUST = 8,
78 G_DATE_OCTOBER = 10,
79 G_DATE_NOVEMBER = 11,
GDateMonth
Definition gdate.h:67
@ G_DATE_DECEMBER
Definition gdate.h:80
@ G_DATE_FEBRUARY
Definition gdate.h:70
@ G_DATE_OCTOBER
Definition gdate.h:78
@ G_DATE_NOVEMBER
Definition gdate.h:79
@ G_DATE_JULY
Definition gdate.h:75
@ G_DATE_MAY
Definition gdate.h:73
@ G_DATE_BAD_MONTH
Definition gdate.h:68
@ G_DATE_AUGUST
Definition gdate.h:76
@ G_DATE_MARCH
Definition gdate.h:71
@ G_DATE_JUNE
Definition gdate.h:74
@ G_DATE_SEPTEMBER
Definition gdate.h:77
@ G_DATE_JANUARY
Definition gdate.h:69
@ G_DATE_APRIL
Definition gdate.h:72

◆ GDateWeekday

Enumerator
G_DATE_BAD_WEEKDAY 
G_DATE_MONDAY 
G_DATE_TUESDAY 
G_DATE_WEDNESDAY 
G_DATE_THURSDAY 
G_DATE_FRIDAY 
G_DATE_SATURDAY 
G_DATE_SUNDAY 

Definition at line 55 of file gdate.h.

56{
58 G_DATE_MONDAY = 1,
62 G_DATE_FRIDAY = 5,
GDateWeekday
Definition gdate.h:56
@ G_DATE_THURSDAY
Definition gdate.h:61
@ G_DATE_MONDAY
Definition gdate.h:58
@ G_DATE_BAD_WEEKDAY
Definition gdate.h:57
@ G_DATE_SUNDAY
Definition gdate.h:64
@ G_DATE_WEDNESDAY
Definition gdate.h:60
@ G_DATE_SATURDAY
Definition gdate.h:63
@ G_DATE_TUESDAY
Definition gdate.h:59
@ G_DATE_FRIDAY
Definition gdate.h:62

Function Documentation

◆ g_date_add_days()

GLIB_AVAILABLE_IN_ALL void g_date_add_days ( GDate * date,
guint n_days )

◆ g_date_add_months()

GLIB_AVAILABLE_IN_ALL void g_date_add_months ( GDate * date,
guint n_months )

◆ g_date_add_years()

GLIB_AVAILABLE_IN_ALL void g_date_add_years ( GDate * date,
guint n_years )

◆ g_date_clamp()

GLIB_AVAILABLE_IN_ALL void g_date_clamp ( GDate * date,
const GDate * min_date,
const GDate * max_date )

◆ g_date_clear()

GLIB_AVAILABLE_IN_ALL void g_date_clear ( GDate * date,
guint n_dates )

◆ g_date_compare()

GLIB_AVAILABLE_IN_ALL gint g_date_compare ( const GDate * lhs,
const GDate * rhs )

◆ g_date_copy()

GLIB_AVAILABLE_IN_2_56 GDate * g_date_copy ( const GDate * date)

◆ g_date_days_between()

GLIB_AVAILABLE_IN_ALL gint g_date_days_between ( const GDate * date1,
const GDate * date2 )

◆ g_date_free()

GLIB_AVAILABLE_IN_ALL void g_date_free ( GDate * date)

◆ g_date_get_day()

GLIB_AVAILABLE_IN_ALL GDateDay g_date_get_day ( const GDate * date)

◆ g_date_get_day_of_year()

GLIB_AVAILABLE_IN_ALL guint g_date_get_day_of_year ( const GDate * date)

◆ g_date_get_days_in_month()

GLIB_AVAILABLE_IN_ALL guint8 g_date_get_days_in_month ( GDateMonth month,
GDateYear year )

◆ g_date_get_iso8601_week_of_year()

GLIB_AVAILABLE_IN_ALL guint g_date_get_iso8601_week_of_year ( const GDate * date)

◆ g_date_get_julian()

GLIB_AVAILABLE_IN_ALL guint32 g_date_get_julian ( const GDate * date)

◆ g_date_get_monday_week_of_year()

GLIB_AVAILABLE_IN_ALL guint g_date_get_monday_week_of_year ( const GDate * date)

◆ g_date_get_monday_weeks_in_year()

GLIB_AVAILABLE_IN_ALL guint8 g_date_get_monday_weeks_in_year ( GDateYear year)

◆ g_date_get_month()

GLIB_AVAILABLE_IN_ALL GDateMonth g_date_get_month ( const GDate * date)

◆ g_date_get_sunday_week_of_year()

GLIB_AVAILABLE_IN_ALL guint g_date_get_sunday_week_of_year ( const GDate * date)

◆ g_date_get_sunday_weeks_in_year()

GLIB_AVAILABLE_IN_ALL guint8 g_date_get_sunday_weeks_in_year ( GDateYear year)

◆ g_date_get_weekday()

GLIB_AVAILABLE_IN_ALL GDateWeekday g_date_get_weekday ( const GDate * date)

◆ g_date_get_year()

GLIB_AVAILABLE_IN_ALL GDateYear g_date_get_year ( const GDate * date)

◆ g_date_is_first_of_month()

GLIB_AVAILABLE_IN_ALL gboolean g_date_is_first_of_month ( const GDate * date)

◆ g_date_is_last_of_month()

GLIB_AVAILABLE_IN_ALL gboolean g_date_is_last_of_month ( const GDate * date)

◆ g_date_is_leap_year()

GLIB_AVAILABLE_IN_ALL gboolean g_date_is_leap_year ( GDateYear year)

◆ g_date_new()

GLIB_AVAILABLE_IN_ALL GDate * g_date_new ( void )

◆ g_date_new_dmy()

GLIB_AVAILABLE_IN_ALL GDate * g_date_new_dmy ( GDateDay day,
GDateMonth month,
GDateYear year )

◆ g_date_new_julian()

GLIB_AVAILABLE_IN_ALL GDate * g_date_new_julian ( guint32 julian_day)

◆ g_date_order()

GLIB_AVAILABLE_IN_ALL void g_date_order ( GDate * date1,
GDate * date2 )

◆ g_date_set_day()

GLIB_AVAILABLE_IN_ALL void g_date_set_day ( GDate * date,
GDateDay day )

◆ g_date_set_dmy()

GLIB_AVAILABLE_IN_ALL void g_date_set_dmy ( GDate * date,
GDateDay day,
GDateMonth month,
GDateYear y )

◆ g_date_set_julian()

GLIB_AVAILABLE_IN_ALL void g_date_set_julian ( GDate * date,
guint32 julian_date )

◆ g_date_set_month()

G_GNUC_END_IGNORE_DEPRECATIONS GLIB_AVAILABLE_IN_ALL void g_date_set_month ( GDate * date,
GDateMonth month )

◆ g_date_set_parse()

GLIB_AVAILABLE_IN_ALL void g_date_set_parse ( GDate * date,
const gchar * str )

◆ g_date_set_time()

void g_date_set_time ( GDate * date,
GTime time_ )

◆ g_date_set_time_t()

GLIB_AVAILABLE_IN_ALL void g_date_set_time_t ( GDate * date,
time_t timet )

◆ g_date_set_time_val()

G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_date_set_time_val ( GDate * date,
GTimeVal * timeval )

◆ g_date_set_year()

GLIB_AVAILABLE_IN_ALL void g_date_set_year ( GDate * date,
GDateYear year )

◆ g_date_strftime()

GLIB_AVAILABLE_IN_ALL gsize g_date_strftime ( gchar * s,
gsize slen,
const gchar * format,
const GDate * date )

◆ g_date_subtract_days()

GLIB_AVAILABLE_IN_ALL void g_date_subtract_days ( GDate * date,
guint n_days )

◆ g_date_subtract_months()

GLIB_AVAILABLE_IN_ALL void g_date_subtract_months ( GDate * date,
guint n_months )

◆ g_date_subtract_years()

GLIB_AVAILABLE_IN_ALL void g_date_subtract_years ( GDate * date,
guint n_years )

◆ g_date_to_struct_tm()

GLIB_AVAILABLE_IN_ALL void g_date_to_struct_tm ( const GDate * date,
struct tm * tm )

◆ g_date_valid()

GLIB_AVAILABLE_IN_ALL gboolean g_date_valid ( const GDate * date)

◆ g_date_valid_day()

GLIB_AVAILABLE_IN_ALL gboolean g_date_valid_day ( GDateDay day)

◆ g_date_valid_dmy()

GLIB_AVAILABLE_IN_ALL gboolean g_date_valid_dmy ( GDateDay day,
GDateMonth month,
GDateYear year )

◆ g_date_valid_julian()

GLIB_AVAILABLE_IN_ALL gboolean g_date_valid_julian ( guint32 julian_date)

◆ g_date_valid_month()

GLIB_AVAILABLE_IN_ALL gboolean g_date_valid_month ( GDateMonth month)

◆ g_date_valid_weekday()

GLIB_AVAILABLE_IN_ALL gboolean g_date_valid_weekday ( GDateWeekday weekday)

◆ g_date_valid_year()

GLIB_AVAILABLE_IN_ALL gboolean g_date_valid_year ( GDateYear year)

◆ GLIB_DEPRECATED_TYPE_IN_2_62_FOR()

struct _GTimeVal GLIB_DEPRECATED_TYPE_IN_2_62_FOR ( GDateTime )