Skip to content

Commit

Permalink
Adjustments and documentation suggested by @coderabbitai
Browse files Browse the repository at this point in the history
  • Loading branch information
rlskoeser committed Nov 8, 2024
1 parent 2368f2e commit 37d8623
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/undate/converters/edtf/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@


class EDTFDateConverter(BaseDateConverter):
"""
Converter for Extended Date/Time Format (EDTF).
Supports parsing and serializing dates and date ranges in EDTF format.
Does not support all of EDTF, and only supports dates and not times.
"""

#: converter name: EDTF
name: str = "EDTF"

Expand Down
4 changes: 2 additions & 2 deletions src/undate/undate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class Undate:
"""object for representing uncertain, fuzzy or partially unknown dates"""

DEFAULT_FORMAT: str = "ISO8601"
DEFAULT_CONVERTER: str = "ISO8601"

#: symbol for unknown digits within a date value
MISSING_DIGIT: str = "X"
Expand Down Expand Up @@ -138,7 +138,7 @@ def __init__(
if converter is None:
# import all subclass definitions; initialize the default
converter_cls = BaseDateConverter.available_converters()[
self.DEFAULT_FORMAT
self.DEFAULT_CONVERTER
]
converter = converter_cls()
self.converter = converter
Expand Down

0 comments on commit 37d8623

Please sign in to comment.