Comments (2)
I think I had a stroke of inspiration of sorts last night (coincidentally in the middle of studying for a final...). I think what I'd like to try out is converting DateTime
to a fixed millisecond precision (thus removing the Instant parameter) and make the Calendar
parameter implicit as well, similar to how Date
is fixed at day precision with ISOCalendar. This drastically simplifies the DateTime code for 90% of use cases out there (I'm assuming).
To not lose the extensibility by being fully parameterized though, I'd like to introduce the Timestamp{I<:Instant,T<:Timezone,C<:Calendar}
type, which would be used for anything requiring extensibility (other Calendar types, Timezone support, different precision levels, etc.). This way we have nice clean, simple code that would be default and Timestamp
for more advanced uses.
Additional advantages of this approach are the fact that the DateTime code was pretty rigidly coded for millisecond precision anyway, and not really generalizable. A fully parameterized Timestamp
type can be written with the write abstractions so that someone just needs to define a few methods and be on there way with a different precision level or calendar type. I think this will also be great because we can separate Timezone support out and have custom operation support without having to muck up all the current clean Date/DateTime clode.
from dates.jl.
Closing for now.
from dates.jl.
Related Issues (20)
- Date array type wrong? HOT 1
- How to parse strings with ignorable start characters? HOT 4
- [PkgEval] Dates may have a testing issue on Julia 0.3 (2014-08-09) HOT 1
- [PkgEval] Dates may have a testing issue on Julia 0.3 (2014-08-14) HOT 1
- [PkgEval] Dates may have a testing issue on Julia 0.3 (2014-08-17) HOT 1
- [PkgEval] Dates may have a testing issue on Julia 0.3 (2014-08-20) HOT 1
- convert `DateTime` to a number of milliseconds HOT 3
- convert to epoc time HOT 4
- [PkgEval] Dates may have a testing issue on Julia 0.3 (2014-09-13)
- [PkgEval] Dates may have a testing issue on Julia 0.3 (2014-09-28) HOT 5
- Silent failure on conversion from string to DateTime HOT 2
- Allow fractions of a second? HOT 2
- wrong REQUIRE? HOT 1
- Implicit local timezone assumed in Epoch HOT 5
- ISO 8601 Zulu dates not parsed HOT 2
- "Dates" in module "Logger" did not define a corresponding module.
- extracting microseconds HOT 1
- Info about upcoming removal of packages in the General registry
- Explain the results of ceiling Dates?
- Compatibility with Datetime HOT 2
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 dates.jl.