Inherits pydatetime::timedelta.
Public Member Functions | |
def | __abs__ |
def | __add__ |
def | __div__ |
def | __floordiv__ |
def | __mul__ |
def | __neg__ |
def | __pos__ |
def | __radd__ |
def | __rdiv__ |
def | __rfloordiv__ |
def | __rmul__ |
def | __rsub__ |
def | __sub__ |
def | convert_to_seconds |
def | fromtimedelta |
def | parse |
Static Public Attributes | |
tuple | regexp |
Hideously ugly regular expression to parse the complex text form. |
Timedelta with text parsing. This accepts two input formats: - A simple integer, indicating a number of seconds. - A string of the form "wD xH yM zS" where w, x, y, and z are integers and D, H, M, and S indicate days, hours, minutes, and seconds. All of the fields are optional, but at least one must be specified. Eg, "3D4H" means "three days plus four hours".
Definition at line 168 of file sundial.py.
def rpki.sundial.timedelta.__abs__ | ( | x | ) |
Definition at line 218 of file sundial.py.
def rpki.sundial.timedelta.__add__ | ( | x, | ||
y | ||||
) |
Definition at line 219 of file sundial.py.
def rpki.sundial.timedelta.__div__ | ( | x, | ||
y | ||||
) |
Definition at line 220 of file sundial.py.
def rpki.sundial.timedelta.__floordiv__ | ( | x, | ||
y | ||||
) |
Definition at line 221 of file sundial.py.
def rpki.sundial.timedelta.__mul__ | ( | x, | ||
y | ||||
) |
Definition at line 222 of file sundial.py.
def rpki.sundial.timedelta.__neg__ | ( | x | ) |
Definition at line 223 of file sundial.py.
def rpki.sundial.timedelta.__pos__ | ( | x | ) |
Definition at line 224 of file sundial.py.
def rpki.sundial.timedelta.__radd__ | ( | x, | ||
y | ||||
) |
Definition at line 225 of file sundial.py.
def rpki.sundial.timedelta.__rdiv__ | ( | x, | ||
y | ||||
) |
Definition at line 226 of file sundial.py.
def rpki.sundial.timedelta.__rfloordiv__ | ( | x, | ||
y | ||||
) |
Definition at line 227 of file sundial.py.
def rpki.sundial.timedelta.__rmul__ | ( | x, | ||
y | ||||
) |
Definition at line 228 of file sundial.py.
def rpki.sundial.timedelta.__rsub__ | ( | x, | ||
y | ||||
) |
Definition at line 229 of file sundial.py.
def rpki.sundial.timedelta.__sub__ | ( | x, | ||
y | ||||
) |
Definition at line 230 of file sundial.py.
def rpki.sundial.timedelta.convert_to_seconds | ( | self | ) |
Convert a timedelta interval to seconds.
Definition at line 209 of file sundial.py.
def rpki.sundial.timedelta.fromtimedelta | ( | cls, | ||
x | ||||
) |
Convert a datetime.timedelta object into this subclass.
Definition at line 214 of file sundial.py.
def rpki.sundial.timedelta.parse | ( | cls, | ||
arg | ||||
) |
Parse text into a timedelta object.
Definition at line 194 of file sundial.py.
rpki::sundial.timedelta::regexp [static] |
re.compile("\\s*".join(("^", "(?:(?P<days>\\d+)D)?", "(?:(?P<hours>\\d+)H)?", "(?:(?P<minutes>\\d+)M)?", "(?:(?P<seconds>\\d+)S)?", "$")), re.I)
Hideously ugly regular expression to parse the complex text form.
Tags are intended for use with re.MatchObject.groupdict() and map directly to the keywords expected by the timedelta constructor.
Definition at line 185 of file sundial.py.