MCPcopy Create free account
hub / github.com/numpy/numpy / strptime

Function strptime

numpy/lib/tests/test_io.py:65–73  ·  view source on GitHub ↗

This function is available in the datetime module only from Python >= 2.5.

(s, fmt=None)

Source from the content-addressed store, hash-verified

63
64
65def strptime(s, fmt=None):
66 """
67 This function is available in the datetime module only from Python >=
68 2.5.
69
70 """
71 if type(s) == bytes:
72 s = s.decode("latin1")
73 return datetime(*time.strptime(s, fmt)[:3])
74
75
76class RoundtripTest:

Calls 1

decodeMethod · 0.80

Tested by

no test coverage detected