MCPcopy Create free account
hub / github.com/apache/arrow / format_date32

Function format_date32

cpp/gdb_arrow.py:267–277  ·  view source on GitHub ↗

Format a date32 value.

(val)

Source from the content-addressed store, hash-verified

265
266
267def format_date32(val):
268 """
269 Format a date32 value.
270 """
271 val = int(val)
272 try:
273 decoded = datetime.date.fromordinal(val + _date_base)
274 except ValueError: # "ordinal must be >= 1"
275 return f"{val}d [year <= 0]"
276 else:
277 return f"{val}d [{decoded}]"
278
279
280def format_date64(val):

Callers 1

to_stringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected