Searched refs:dtstr (Results 1 – 5 of 5) sorted by relevance
/external/python/dateutil/dateutil/test/ |
D | test_isoparser.py | 51 dtstr = dt.strftime('%Y') 53 assert isoparse(dtstr) == dt 59 dtstr = dt.strftime(fmt) 61 assert isoparse(dtstr) == dt 68 dtstr = dt.strftime(fmt) 70 assert isoparse(dtstr) == dt 77 dtstr = dt.strftime(fmt) 84 dtstr = dtstr[:-(6 - microsecond_precision)] 88 dtstr += offset_str 90 assert isoparse(dtstr) == dt [all …]
|
D | test_parser.py | 833 dtstr = '090107' 836 self.assertEqual(parse(dtstr), 839 self.assertEqual(parse(dtstr, yearfirst=False, dayfirst=False), 843 dtstr = '090107' 846 self.assertEqual(parse(dtstr, yearfirst=True), 849 self.assertEqual(parse(dtstr, yearfirst=True, dayfirst=False), 853 dtstr = '090107' 856 self.assertEqual(parse(dtstr, dayfirst=True), 859 self.assertEqual(parse(dtstr, yearfirst=False, dayfirst=True), 863 dtstr = '090107' [all …]
|
/external/python/cpython3/Modules/ |
D | _datetimemodule.c | 686 parse_isoformat_date(const char *dtstr, int *year, int *month, int *day) in parse_isoformat_date() argument 695 const char *p = dtstr; in parse_isoformat_date() 772 parse_isoformat_time(const char *dtstr, size_t dtlen, int *hour, int *minute, in parse_isoformat_time() argument 785 const char *p = dtstr; in parse_isoformat_time() 786 const char *p_end = dtstr + dtlen; in parse_isoformat_time() 795 int rv = parse_hh_mm_ss_ff(dtstr, tzinfo_pos, hour, minute, second, in parse_isoformat_time() 2931 date_fromisoformat(PyObject *cls, PyObject *dtstr) in date_fromisoformat() argument 2933 assert(dtstr != NULL); in date_fromisoformat() 2935 if (!PyUnicode_Check(dtstr)) { in date_fromisoformat() 2943 const char *dt_ptr = PyUnicode_AsUTF8AndSize(dtstr, &len); in date_fromisoformat() [all …]
|
/external/python/cpython3/Lib/test/ |
D | datetimetester.py | 2406 dtstr = "{}{:02d}{:02d} {}".format(sign, hours, minutes, tzname) 2407 dt = strptime(dtstr, "%z %Z") 2411 dtstr, fmt = "+1234 UTC", "%z %Z" 2412 dt = strptime(dtstr, fmt) 2416 self.assertEqual(dt.strftime(fmt), dtstr) 2663 dtstr = dt.isoformat(sep=sep) 2665 with self.subTest(dtstr=dtstr): 2666 dt_rt = self.theclass.fromisoformat(dtstr) 2688 dtstr = dt.isoformat() 2690 with self.subTest(tstr=dtstr): [all …]
|
/external/python/cpython3/Lib/ |
D | datetime.py | 260 def _parse_isoformat_date(dtstr): argument 263 year = int(dtstr[0:4]) 264 if dtstr[4] != '-': 265 raise ValueError('Invalid date separator: %s' % dtstr[4]) 267 month = int(dtstr[5:7]) 269 if dtstr[7] != '-': 272 day = int(dtstr[8:10])
|