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

Function format_date32

cpp/gdb_arrow.py:269–279  ·  view source on GitHub ↗

Format a date32 value.

(val)

Source from the content-addressed store, hash-verified

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

Callers 1

to_stringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected