Searched refs:dtstr (Results 1 – 7 of 7) sorted by relevance
/external/python/dateutil/dateutil/test/ |
D | test_parser.py | 598 dtstr = '090107' 601 self.assertEqual(parse(dtstr), 604 self.assertEqual(parse(dtstr, yearfirst=False, dayfirst=False), 608 dtstr = '090107' 611 self.assertEqual(parse(dtstr, yearfirst=True), 614 self.assertEqual(parse(dtstr, yearfirst=True, dayfirst=False), 618 dtstr = '090107' 621 self.assertEqual(parse(dtstr, dayfirst=True), 624 self.assertEqual(parse(dtstr, yearfirst=False, dayfirst=True), 628 dtstr = '090107' [all …]
|
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 …]
|
/external/python/dateutil/dateutil/test/property/ |
D | test_isoparse_prop.py | 24 dtstr = dt.isoformat(sep=sep) 25 dt_rt = isoparse(dtstr)
|
/external/python/dateutil/docs/exercises/ |
D | index.rst | 180 dtstr = dt_exp.strftime('%Y-%m-%d %H:%M:%S %Z') 182 dt_act = parse_func_us_jp_ind(dtstr) 230 for dtstr, dt_exp in PARSE_IXT_TEST_CASE: 231 dt_act = parse_func_ind_ire(dtstr)
|
/external/python/cpython3/Modules/ |
D | _datetimemodule.c | 703 parse_isoformat_date(const char *dtstr, int *year, int *month, int *day) in parse_isoformat_date() argument 712 const char *p = dtstr; in parse_isoformat_date() 789 parse_isoformat_time(const char *dtstr, size_t dtlen, int *hour, int *minute, in parse_isoformat_time() argument 802 const char *p = dtstr; in parse_isoformat_time() 803 const char *p_end = dtstr + dtlen; in parse_isoformat_time() 812 int rv = parse_hh_mm_ss_ff(dtstr, tzinfo_pos, hour, minute, second, in parse_isoformat_time() 2970 date_fromisoformat(PyObject *cls, PyObject *dtstr) in date_fromisoformat() argument 2972 assert(dtstr != NULL); in date_fromisoformat() 2974 if (!PyUnicode_Check(dtstr)) { in date_fromisoformat() 2982 const char *dt_ptr = PyUnicode_AsUTF8AndSize(dtstr, &len); in date_fromisoformat() [all …]
|
/external/python/cpython3/Lib/test/ |
D | datetimetester.py | 2595 dtstr = "{}{:02d}{:02d} {}".format(sign, hours, minutes, tzname) 2596 dt = strptime(dtstr, "%z %Z") 2600 dtstr, fmt = "+1234 UTC", "%z %Z" 2601 dt = strptime(dtstr, fmt) 2605 self.assertEqual(dt.strftime(fmt), dtstr) 2911 dtstr = dt.isoformat(sep=sep) 2913 with self.subTest(dtstr=dtstr): 2914 dt_rt = self.theclass.fromisoformat(dtstr) 2936 dtstr = dt.isoformat() 2938 with self.subTest(tstr=dtstr): [all …]
|
/external/python/cpython3/Lib/ |
D | datetime.py | 264 def _parse_isoformat_date(dtstr): argument 267 year = int(dtstr[0:4]) 268 if dtstr[4] != '-': 269 raise ValueError('Invalid date separator: %s' % dtstr[4]) 271 month = int(dtstr[5:7]) 273 if dtstr[7] != '-': 276 day = int(dtstr[8:10])
|