Home
last modified time | relevance | path

Searched refs:dtstr (Results 1 - 5 of 5) sorted by relevance

/third_party/python/Lib/test/test_email/
H A Dtest_utils.py67 for dtstr in invalid_dates:
68 with self.subTest(dtstr=dtstr):
69 self.assertRaises(ValueError, utils.parsedate_to_datetime, dtstr)
H A Dtest_email.py3064 for dtstr in invalid_dates:
3065 with self.subTest(dtstr=dtstr):
3066 self.assertIsNone(utils.parsedate(dtstr))
3067 self.assertIsNone(utils.parsedate_tz(dtstr))
/third_party/python/Lib/
H A Ddatetime.py268 def _find_isoformat_datetime_separator(dtstr):
270 len_dtstr = len(dtstr)
278 if dtstr[4] == date_separator:
279 if dtstr[5] == week_indicator:
282 if len_dtstr > 8 and dtstr[8] == date_separator:
285 if len_dtstr > 10 and _is_ascii_digit(dtstr[10]):
304 if dtstr[4] == week_indicator:
308 if not _is_ascii_digit(dtstr[idx]):
325 def _parse_isoformat_date(dtstr):
328 assert len(dtstr) i
[all...]
/third_party/python/Modules/
H A D_datetimemodule.c737 parse_isoformat_date(const char *dtstr, const size_t len, int *year, int *month, int *day) in parse_isoformat_date() argument
749 const char *p = dtstr; in parse_isoformat_date()
771 assert(p > dtstr); in parse_isoformat_date()
772 if ((size_t)(p - dtstr) < len) { in parse_isoformat_date()
875 parse_isoformat_time(const char *dtstr, size_t dtlen, int *hour, int *minute, in parse_isoformat_time() argument
888 const char *p = dtstr; in parse_isoformat_time()
889 const char *p_end = dtstr + dtlen; in parse_isoformat_time()
898 int rv = parse_hh_mm_ss_ff(dtstr, tzinfo_pos, hour, minute, second, in parse_isoformat_time()
3058 date_fromisoformat(PyObject *cls, PyObject *dtstr) in date_fromisoformat() argument
3060 assert(dtstr ! in date_fromisoformat()
5273 _sanitize_isoformat_str(PyObject *dtstr) _sanitize_isoformat_str() argument
5330 _find_isoformat_datetime_separator(const char *dtstr, Py_ssize_t len) _find_isoformat_datetime_separator() argument
5429 datetime_fromisoformat(PyObject *cls, PyObject *dtstr) datetime_fromisoformat() argument
[all...]
/third_party/python/Lib/test/
H A Ddatetimetester.py2697 dtstr = "{}{:02d}{:02d} {}".format(sign, hours, minutes, tzname)
2698 dt = strptime(dtstr, "%z %Z")
2702 dtstr, fmt = "+1234 UTC", "%z %Z"
2703 dt = strptime(dtstr, fmt)
2707 self.assertEqual(dt.strftime(fmt), dtstr)
3014 dtstr = dt.isoformat(sep=sep)
3016 with self.subTest(dtstr=dtstr):
3017 dt_rt = self.theclass.fromisoformat(dtstr)
3039 dtstr
[all...]

Completed in 21 milliseconds