Date#

class Date(**kwargs)#
Constructors:

Date()
new() -> GLib.Date
new_dmy(day:int, month:GLib.DateMonth, year:int) -> GLib.Date
new_julian(julian_day:int) -> GLib.Date

Constructors#

class Date
classmethod new() Date#
classmethod new_dmy(day: int, month: DateMonth, year: int) Date#
Parameters:
  • day

  • month

  • year

classmethod new_julian(julian_day: int) Date#
Parameters:

julian_day

Methods#

class Date
add_days(n_days: int) None#
Parameters:

n_days

add_months(n_months: int) None#
Parameters:

n_months

add_years(n_years: int) None#
Parameters:

n_years

clamp(min_date: Date, max_date: Date) None#
Parameters:
  • min_date

  • max_date

clear(n_dates: int) None#
Parameters:

n_dates

compare(rhs: Date) int#
Parameters:

rhs

days_between(date2: Date) int#
Parameters:

date2

free() None#
get_day() int#
get_day_of_year() int#
get_days_in_month(month: DateMonth, year: int) int#
Parameters:
  • month

  • year

get_iso8601_week_of_year() int#
get_julian() int#
get_monday_week_of_year() int#
get_monday_weeks_in_year(year: int) int#
Parameters:

year

get_month() DateMonth#
get_sunday_week_of_year() int#
get_sunday_weeks_in_year(year: int) int#
Parameters:

year

get_weekday() DateWeekday#
get_year() int#
is_first_of_month() bool#
is_last_of_month() bool#
is_leap_year(year: int) bool#
Parameters:

year

order(date2: Date) None#
Parameters:

date2

set_day(day: int) None#
Parameters:

day

set_dmy(day: int, month: DateMonth, y: int) None#
Parameters:
  • day

  • month

  • y

set_julian(julian_date: int) None#
Parameters:

julian_date

set_month(month: DateMonth) None#
Parameters:

month

set_parse(str: str) None#
Parameters:

str

set_time(time_: int) None#
Parameters:

time

set_time_t(timet: int) None#
Parameters:

timet

set_time_val(timeval: TimeVal) None#
Parameters:

timeval

set_year(year: int) None#
Parameters:

year

strftime(s: str, slen: int, format: str, date: Date) int#
Parameters:
  • s

  • slen

  • format

  • date

subtract_days(n_days: int) None#
Parameters:

n_days

subtract_months(n_months: int) None#
Parameters:

n_months

subtract_years(n_years: int) None#
Parameters:

n_years

to_struct_tm(tm: None) None#
Parameters:

tm

valid() bool#
valid_day(day: int) bool#
Parameters:

day

valid_dmy(day: int, month: DateMonth, year: int) bool#
Parameters:
  • day

  • month

  • year

valid_julian(julian_date: int) bool#
Parameters:

julian_date

valid_month(month: DateMonth) bool#
Parameters:

month

valid_weekday(weekday: DateWeekday) bool#
Parameters:

weekday

valid_year(year: int) bool#
Parameters:

year

Fields#

class Date
day#
dmy#
julian#
julian_days#
month#
year#