You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that this type is rather useless.
E.g.:
you can't find the exact number of days this amounts to
you can't compare values of this type, only test equality
this type is undocumented
This type's only vaguely useful destructors are its fields ctMonths and ctTime, unfortunately ctMonths representing a number of months, one cannot find the duration it amounts to. CalendarDiffTime {ctMonths = 1, ctTime = fromInteger 0} has a different meaning (hence, duration value, hence number of days) between January and February vs between February and March.
How about switching to a more useful type, e.g. NominalDiffTime?
This type has many useful destructors, like Ord and Num instances (e.g. one can myNominalDiffTime / nominalDay to find the number of days).
The text was updated successfully, but these errors were encountered:
Currently Rel8.Expr.Time treats durations (SQL type
interval
) as CalendarDiffTime.The problem is that this type is rather useless.
E.g.:
This type's only vaguely useful destructors are its fields
ctMonths
andctTime
, unfortunatelyctMonths
representing a number of months, one cannot find the duration it amounts to.CalendarDiffTime {ctMonths = 1, ctTime = fromInteger 0}
has a different meaning (hence, duration value, hence number of days) between January and February vs between February and March.How about switching to a more useful type, e.g. NominalDiffTime?
This type has many useful destructors, like
Ord
andNum
instances (e.g. one canmyNominalDiffTime / nominalDay
to find the number of days).The text was updated successfully, but these errors were encountered: