Replies: 3 comments
-
java.time supports it to some degree, with Duration/parse and Period/parse. the t/interval? thing is weird and comes from the fact that tick used to accept strings as args to just about any function, which it would then try and parse. This has not completely been removed and I don't want to break people further now really. but (t/interval? "foo") is also true because the ITimeSpan protocol is extended to strings, with the intention you could do (t/beginning "...some parseable date string...") |
Beta Was this translation helpful? Give feedback.
-
Thanks for the answer. I'm aware about Java support for ISO duration, but was wondering if |
Beta Was this translation helpful? Give feedback.
-
Ah I see what you mean. Cross platform support of almost all java time is
available via cljc.java-time - definitely these parse fns are there.
No plan to add these to tick atm
…On Sat, 22 Apr 2023, 17:13 volisoft, ***@***.***> wrote:
Thanks for the answer. I'm aware about Java support for ISO duration, but
was wondering if tick supports it.
I'm asking because one of the advantages of tick is that it works both on
Java and Javascript platforms. Having uniform interface is very convenient.
If there is no support for the duration format, do you plan to add it?
—
Reply to this email directly, view it on GitHub
<#184 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXNSDEL7OY4AM7I5FKIC7DXCP7SJANCNFSM6AAAAAAW24UMJ4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Is there support for standard ISO 8601 duration format?
For example, does
tick
understands strings likePT1H2M
and parses it into duration?Couldn't find appropriate function for it, and wondering if it's supported or planned for future?
As a side note, the string above is recognized as interval:
(t/interval? "PT1H2M") => true
, which might be an issue since it's not an interval.Beta Was this translation helpful? Give feedback.
All reactions