:right-sidebar: True Duration =================================================================== .. currentmodule:: gi.repository.ICalGLib .. class:: Duration(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.ICalGLib.Object`, :class:`~gi.repository.GObject.Object` This is the ICalDuration instance. Constructors ------------ .. rst-class:: interim-class .. class:: Duration :no-index: .. classmethod:: new_bad_duration() -> ~gi.repository.ICalGLib.Duration Creates a bad :obj:`~gi.repository.ICalGLib.Duration`\. .. versionadded:: 1.0 .. classmethod:: new_from_int(t: int) -> ~gi.repository.ICalGLib.Duration Creates a :obj:`~gi.repository.ICalGLib.Duration` from the duration in second. .. versionadded:: 1.0 :param t: The duration in second .. classmethod:: new_from_string(str: str) -> ~gi.repository.ICalGLib.Duration Creates a :obj:`~gi.repository.ICalGLib.Duration` from the duration in string. .. versionadded:: 1.0 :param str: The string representation of the duration .. classmethod:: new_null_duration() -> ~gi.repository.ICalGLib.Duration Creates a :obj:`~gi.repository.ICalGLib.Duration` with all the fields to be zero. .. versionadded:: 1.0 Methods ------- .. rst-class:: interim-class .. class:: Duration :no-index: .. method:: as_ical_string() -> str Converts the :obj:`~gi.repository.ICalGLib.Duration` to the representation in string. .. versionadded:: 1.0 .. method:: as_int() -> int Converts the :obj:`~gi.repository.ICalGLib.Duration` to the representation in second. .. versionadded:: 1.0 .. method:: get_days() -> int Gets the days of :obj:`~gi.repository.ICalGLib.Duration`\. .. versionadded:: 1.0 .. method:: get_hours() -> int Gets the hours of :obj:`~gi.repository.ICalGLib.Duration`\. .. versionadded:: 1.0 .. method:: get_minutes() -> int Gets the minutes of :obj:`~gi.repository.ICalGLib.Duration`\. .. versionadded:: 1.0 .. method:: get_seconds() -> int Gets the seconds of :obj:`~gi.repository.ICalGLib.Duration`\. .. versionadded:: 1.0 .. method:: get_weeks() -> int Gets the weeks of :obj:`~gi.repository.ICalGLib.Duration`\. .. versionadded:: 1.0 .. method:: is_bad_duration() -> bool Checks whether the :obj:`~gi.repository.ICalGLib.Duration` is the bad_duration. .. versionadded:: 1.0 .. method:: is_neg() -> bool Gets the is_neg of :obj:`~gi.repository.ICalGLib.Duration`\. .. versionadded:: 1.0 .. method:: is_null_duration() -> bool Checks whether the :obj:`~gi.repository.ICalGLib.Duration` is the null_duration. .. versionadded:: 1.0 .. method:: set_days(days: int) -> None Sets the days of :obj:`~gi.repository.ICalGLib.Duration`\. .. versionadded:: 1.0 :param days: The days .. method:: set_hours(hours: int) -> None Sets the hours of :obj:`~gi.repository.ICalGLib.Duration`\. .. versionadded:: 1.0 :param hours: The hours .. method:: set_is_neg(is_neg: bool) -> None Sets the is_neg of :obj:`~gi.repository.ICalGLib.Duration`\. .. versionadded:: 1.0 :param is_neg: The is_neg .. method:: set_minutes(minutes: int) -> None Sets the minutes of :obj:`~gi.repository.ICalGLib.Duration`\. .. versionadded:: 1.0 :param minutes: The minutes .. method:: set_seconds(seconds: int) -> None Sets the seconds of :obj:`~gi.repository.ICalGLib.Duration`\. .. versionadded:: 1.0 :param seconds: The seconds .. method:: set_weeks(weeks: int) -> None Sets the weeks of :obj:`~gi.repository.ICalGLib.Duration`\. .. versionadded:: 1.0 :param weeks: The weeks