MCPcopy Index your code
hub / github.com/python/cpython / isoformat

Method isoformat

Lib/_pydatetime.py:1128–1137  ·  view source on GitHub ↗

Return the date formatted according to ISO. This is 'YYYY-MM-DD'. References: - https://www.w3.org/TR/NOTE-datetime - https://www.cl.cam.ac.uk/~mgk25/iso-time.html

(self)

Source from the content-addressed store, hash-verified

1126 return str(self)
1127
1128 def isoformat(self):
1129 """Return the date formatted according to ISO.
1130
1131 This is 'YYYY-MM-DD'.
1132
1133 References:
1134 - https://www.w3.org/TR/NOTE-datetime
1135 - https://www.cl.cam.ac.uk/~mgk25/iso-time.html
1136 """
1137 return "%04d-%02d-%02d" % (self._year, self._month, self._day)
1138
1139 __str__ = isoformat
1140

Callers 15

file_mtimeFunction · 0.45
adapt_dateFunction · 0.45
adapt_datetimeFunction · 0.45
test_isoformatMethod · 0.45
test_fromisoformatMethod · 0.45
test_isoformatMethod · 0.45

Calls

no outgoing calls