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
It seems that cljs-time supports two different data structures: interval and period. They available in public API via cljs-time.core/interval and cljs-time.core/period. Only interval is documented. What's purpose for period and what's differences from interval?
The text was updated successfully, but these errors were encountered:
Intervals have a specific start and end (i.e. is between two date-times)
Periods is a representation of an Interval as being 2 years, 3 months and 2 days etc.
It should be apparent that you can convert any interval to a unique period, but not the other way around.
EDIT: did a bit more reading... cljs-time follows clj-time API closely, which is based on Joda time. This SO post explains interval/period/durations in Joda world.
goog.date, on which cljs-time is based, only implements intervals, but no periods.
It seems that cljs-time supports two different data structures: interval and period. They available in public API via
cljs-time.core/interval
andcljs-time.core/period
. Only interval is documented. What's purpose for period and what's differences from interval?The text was updated successfully, but these errors were encountered: