Duration
-
class Duration(**properties: Any)
Superclasses: Object, Object
This is the ICalDuration instance.
Constructors
-
class Duration
-
classmethod new_bad_duration() → Duration
Creates a bad Duration.
-
classmethod new_from_int(t: int) → Duration
Creates a Duration from the duration in second.
- Parameters:
t – The duration in second
-
classmethod new_from_string(str: str) → Duration
Creates a Duration from the duration in string.
- Parameters:
str – The string representation of the duration
-
classmethod new_null_duration() → Duration
Creates a Duration with all the fields to be zero.
Methods
-
class Duration
-
as_ical_string() → str
Converts the Duration to the representation in string.
-
as_int() → int
Converts the Duration to the representation in second.
-
get_days() → int
Gets the days of Duration.
-
get_hours() → int
Gets the hours of Duration.
-
get_minutes() → int
Gets the minutes of Duration.
-
get_seconds() → int
Gets the seconds of Duration.
-
get_weeks() → int
Gets the weeks of Duration.
-
is_bad_duration() → bool
Checks whether the Duration is the bad_duration.
-
is_neg() → bool
Gets the is_neg of Duration.
-
is_null_duration() → bool
Checks whether the Duration is the null_duration.
-
set_days(days: int) → None
Sets the days of Duration.
- Parameters:
days – The days
-
set_hours(hours: int) → None
Sets the hours of Duration.
- Parameters:
hours – The hours
-
set_is_neg(is_neg: bool) → None
Sets the is_neg of Duration.
- Parameters:
is_neg – The is_neg
-
set_minutes(minutes: int) → None
Sets the minutes of Duration.
- Parameters:
minutes – The minutes
-
set_seconds(seconds: int) → None
Sets the seconds of Duration.
- Parameters:
seconds – The seconds
-
set_weeks(weeks: int) → None
Sets the weeks of Duration.
- Parameters:
weeks – The weeks