taskbridgeapp.helpers.DateUtil

class taskbridgeapp.helpers.DateUtil

Bases: object

Utility class for converting between several date and date/time formats.

Methods

convert

Convert one date/datetime format to another.

Attributes

APPLE_DATETIME

APPLE_DATETIME_ALT

CALDAV_DATE

CALDAV_DATETIME

SQLITE_DATETIME

__init__()
static convert(source_format, obj, required_format='')

Convert one date/datetime format to another. :rtype: str | datetime | bool

Parameters:

source_format (str) – the format of the source date/datetime. Can be left empty if obj is a datetime

object. :type obj: str | datetime :param obj: what to convert from. Can either be a string, or a datetime object. :type required_format: str :param required_format: the format required if the required output is of type str.