Comments (4)
Not quite sure what you have in mind - can you provide some examples?
from clj-time.
What I was thinking was something along these lines:
(plus (minutes 50) (minutes 10)) ;; #<Hours PT1H>
(plus (hours 26) (hours 22)) ;; #<Days P2D>
I haven't thought about it a whole lot, but I thought it might be a nice feature, and somewhat clojure-esque. It might be better to have separate functions that promote time intervals rather than make it the default behavior.
from clj-time.
I'm in two minds. For the most part, the units should be opaque I think, unless you convert them to a period / interval, so I'm not sure that normalizing them proactively is a good idea. Does converting to a period / interval not do enough of want you would want here?
from clj-time.
I'm afraid it would complicate things a lot and possibly break compatibility with Joda Time in subtle ways.
from clj-time.
Related Issues (20)
- local-time has no tests for 2-arity version HOT 1
- Some way to get weekyear field
- Must Import DateTime after upgrade to 0.14.1 HOT 3
- Update dependencies HOT 1
- unparsing a nil datetime unparses now HOT 1
- Year from an instant gets mis-parsed: 2018 becomes 118 HOT 2
- date format keeps static date if unparse receives a nil date argument HOT 1
- Extend Inst protocol to org.joda.time.DateTime HOT 1
- No way to work with Periods & Durations HOT 2
- Latest Clojure master requires Java 8 HOT 2
- Interval arithmetic HOT 2
- Dependencies out of date HOT 3
- `clj-time.core/equal?` returns unexpected value. HOT 1
- clj-time.core/overlaps? provides inconsistent results. HOT 1
- Lack of type hints HOT 3
- Inconsistent argument order when defining formatter with one/multiple formats HOT 1
- no way to retain timezone information when parsing string HOT 1
- "before?" pretends to handle nil while sometimes failing
- `to-time-zone` returns DateTime, even though documentation says it should return `ReadableDateTime` HOT 3
- Can't use tagged literal inside data structures HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clj-time.