MCPcopy Index your code
hub / github.com/python-pendulum/pendulum / parse

Function parse

src/pendulum/parsing/__init__.py:69–78  ·  view source on GitHub ↗

Parses a string with the given options. :param text: The string to parse.

(text: str, **options: Any)

Source from the content-addressed store, hash-verified

67
68
69def parse(text: str, **options: Any) -> datetime | date | time | _Interval | Duration:
70 """
71 Parses a string with the given options.
72
73 :param text: The string to parse.
74 """
75 _options: dict[str, Any] = copy.copy(DEFAULT_OPTIONS)
76 _options.update(options)
77
78 return _normalize(_parse(text, **_options), **_options)
79
80
81def _normalize(

Callers 15

test_parse_durationFunction · 0.90
test_yFunction · 0.90
test_ymFunction · 0.90
test_ymdFunction · 0.90
test_ymd_one_characterFunction · 0.90
test_ymd_hmsFunction · 0.90

Calls 2

_normalizeFunction · 0.85
_parseFunction · 0.70

Tested by 15

test_parse_durationFunction · 0.72
test_yFunction · 0.72
test_ymFunction · 0.72
test_ymdFunction · 0.72
test_ymd_one_characterFunction · 0.72
test_ymd_hmsFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…