-
-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
client APIAnything related to the client API and its qualityAnything related to the client API and its qualityfeatureSomething new to buildSomething new to build
Milestone
Description
Hi, I have a schema like:
{"name": "birthday",
"type": "int",
"logicalType": "date"}In order to pass a Date sigil into it it has to be converted to "the number of days since unix epoch":
def date2int(d) when is_struct(d, Date) do
Date.diff(d, ~D[1970-01-01])
end
def date2int(d) when is_binary(d) and 10 == byte_size(d) do
Date.from_iso8601!(d), ~D[1970-01-01]) # this can obviously fail
endI don't have the expertise to add handling of logicalType to the library, but leaving it here in case someone else needs this. :-)
ping @stretch
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
client APIAnything related to the client API and its qualityAnything related to the client API and its qualityfeatureSomething new to buildSomething new to build