Skip to content

Date Formats

DateFormat

Bases: Enum

Date format options for the reformat_date function.

  • YYYY_MM_DD
  • DD_MM_YYYY
  • MM_DD_YYYY
Source code in dsp/dsp-tools/src/dsp_tools/xmllib/models/date_formats.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
class DateFormat(Enum):
    """
    Date format options for the [`reformat_date`](https://docs.dasch.swiss/latest/DSP-TOOLS/xmllib-docs/general-functions/#xmllib.general_functions.reformat_date) function.

    - `YYYY_MM_DD`
    - `DD_MM_YYYY`
    - `MM_DD_YYYY`
    """  # noqa: E501

    YYYY_MM_DD = auto()
    DD_MM_YYYY = auto()
    MM_DD_YYYY = auto()

Calendar

Bases: Enum

Calendar options for the reformat_date function.

  • GREGORIAN
  • JULIAN
  • ISLAMIC
Source code in dsp/dsp-tools/src/dsp_tools/xmllib/models/date_formats.py
21
22
23
24
25
26
27
28
29
30
31
32
class Calendar(Enum):
    """
    Calendar options for the [`reformat_date`](https://docs.dasch.swiss/latest/DSP-TOOLS/xmllib-docs/general-functions/#xmllib.general_functions.reformat_date) function.

    - `GREGORIAN`
    - `JULIAN`
    - `ISLAMIC`
    """  # noqa: E501

    GREGORIAN = "GREGORIAN"
    JULIAN = "JULIAN"
    ISLAMIC = "ISLAMIC"

Era

Bases: Enum

Era options for the reformat_date function.

  • CE
  • BCE
  • AD
  • BC
Source code in dsp/dsp-tools/src/dsp_tools/xmllib/models/date_formats.py
35
36
37
38
39
40
41
42
43
44
45
46
47
48
class Era(Enum):
    """
    Era options for the [`reformat_date`](https://docs.dasch.swiss/latest/DSP-TOOLS/xmllib-docs/general-functions/#xmllib.general_functions.reformat_date) function.

    - `CE`
    - `BCE`
    - `AD`
    - `BC`
    """  # noqa: E501

    CE = "CE"
    BCE = "BCE"
    AD = "AD"
    BC = "BC"