-
Notifications
You must be signed in to change notification settings - Fork 1
Runtime Data Representation
Jack Feser edited this page Jan 7, 2019
·
1 revision
Castor represents dates as the number of days since the UNIX epoch.
In implang.ml
, dates and integers share many operations (since dates are represented as integers at runtime). However, not all operations that are valid for integers are valid for dates. For example, dates can be subtracted from each other (producing the offset between them) but not added.
-
year(x) = 365 * x
,month(x) = 30 * x
andday(x) = x
. Other dbs have more sophisticated date math.