:right-sidebar: True Date =================================================================== .. currentmodule:: gi.repository.GObject .. class:: Date(**kwargs) :no-contents-entry: :Constructors: :: Date() new() -> GLib.Date new_dmy(day:int, month:GLib.DateMonth, year:int) -> GLib.Date new_julian(julian_day:int) -> GLib.Date Constructors ------------ .. rst-class:: interim-class .. class:: Date :no-index: .. classmethod:: new() -> ~gi.repository.GLib.Date .. classmethod:: new_dmy(day: int, month: ~gi.repository.GLib.DateMonth, year: int) -> ~gi.repository.GLib.Date :param day: :param month: :param year: .. classmethod:: new_julian(julian_day: int) -> ~gi.repository.GLib.Date :param julian_day: Methods ------- .. rst-class:: interim-class .. class:: Date :no-index: .. method:: add_days(n_days: int) -> None :param n_days: .. method:: add_months(n_months: int) -> None :param n_months: .. method:: add_years(n_years: int) -> None :param n_years: .. method:: clamp(min_date: ~gi.repository.GLib.Date, max_date: ~gi.repository.GLib.Date) -> None :param min_date: :param max_date: .. method:: clear(n_dates: int) -> None :param n_dates: .. method:: compare(rhs: ~gi.repository.GLib.Date) -> int :param rhs: .. method:: days_between(date2: ~gi.repository.GLib.Date) -> int :param date2: .. method:: free() -> None .. method:: get_day() -> int .. method:: get_day_of_year() -> int .. classmethod:: get_days_in_month(year: int) -> int :param year: .. method:: get_iso8601_week_of_year() -> int .. method:: get_julian() -> int .. method:: get_monday_week_of_year() -> int .. classmethod:: get_monday_weeks_in_year() -> int .. method:: get_month() -> ~gi.repository.GLib.DateMonth .. method:: get_sunday_week_of_year() -> int .. classmethod:: get_sunday_weeks_in_year() -> int .. method:: get_weekday() -> ~gi.repository.GLib.DateWeekday .. method:: get_year() -> int .. method:: is_first_of_month() -> bool .. method:: is_last_of_month() -> bool .. classmethod:: is_leap_year() -> bool .. method:: order(date2: ~gi.repository.GLib.Date) -> None :param date2: .. method:: set_day(day: int) -> None :param day: .. method:: set_dmy(day: int, month: ~gi.repository.GLib.DateMonth, y: int) -> None :param day: :param month: :param y: .. method:: set_julian(julian_date: int) -> None :param julian_date: .. method:: set_month(month: ~gi.repository.GLib.DateMonth) -> None :param month: .. method:: set_parse(str: str) -> None :param str: .. method:: set_time(time_: int) -> None :param time_: .. method:: set_time_t(timet: int) -> None :param timet: .. method:: set_time_val(timeval: ~gi.repository.GLib.TimeVal) -> None :param timeval: .. method:: set_year(year: int) -> None :param year: .. classmethod:: strftime(slen: int, format: str, date: ~gi.repository.GLib.Date) -> int :param slen: :param format: :param date: .. method:: subtract_days(n_days: int) -> None :param n_days: .. method:: subtract_months(n_months: int) -> None :param n_months: .. method:: subtract_years(n_years: int) -> None :param n_years: .. method:: to_struct_tm(tm: ~typing.Any) -> None :param tm: .. method:: valid() -> bool .. classmethod:: valid_day() -> bool .. classmethod:: valid_dmy(month: ~gi.repository.GLib.DateMonth, year: int) -> bool :param month: :param year: .. classmethod:: valid_julian() -> bool .. classmethod:: valid_month() -> bool .. classmethod:: valid_weekday() -> bool .. classmethod:: valid_year() -> bool Fields ------ .. rst-class:: interim-class .. class:: Date :no-index: .. attribute:: day .. attribute:: dmy .. attribute:: julian .. attribute:: julian_days .. attribute:: month .. attribute:: year