We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to calculate number of days between two dates. What am I missing here?
cljs.user=> (time-core/today) #object[Object 20170126] cljs.user=> (time-core/local-date 2017 1 27) #object[Object 20170127] cljs.user=> (time-core/interval (time-core/today) (time-core/local-date 2017 1 27)) #cljs-time.core.Interval{:start #object[Object 20170126], :end #object[Object 20170127]} cljs.user=> (time-core/in-hours (time-core/interval (time-core/today) (time-core/local-date 2017 1 27))) 13
The text was updated successfully, but these errors were encountered:
I have solved using to/from-default-time-zone functions. Still looks not intuitive to me.
to/from-default-time-zone
Sorry, something went wrong.
(cljs-time.core/today) returns a UTC date, whereas local-* return dates in the user's timezone.
(cljs-time.core/today)
local-*
today is printed as a date without time. That's why it may be confusing. It would be nice to have Date without time for such calculations.
today
Ah, just looking through the code. This is a bug I think, sorry.
No branches or pull requests
I want to calculate number of days between two dates.
What am I missing here?
The text was updated successfully, but these errors were encountered: