Skip to content

Grannath/elm-date-time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elm-date-time

An extensible date time library for Elm

First off, thanks to Bogdanp and all other contributers to elm-time. A large part of this library is based on their work (or shamelessly copied). I hope you like what will become of it.

Why another library?

There are the core modules Date and Time already. A much more comprehensive library is found in elm-time, formerly maintained by Bogdanp, now by [elm-community][elm-community]. So why bother with this one?

Bogdanp did a great job. Unfortunately, date and time handling is complicated. Many cases cannot be covered with elm-time, like leap seconds. Also, it only supports the (proleptic) gregorian calendar and is hard to extend.

This library tries to stay close to the API from elm-time where this makes sense. But due to the nature of things, it will not be a drop-in replacement. In case you are wondering now if you should start with the simple library and switch if you ever need it: don't. Sooner or later, all the little edge cases creep up. If you don't believe me, read a little bit about week numbering.

(Planned) Features

Many features are planned for this library. I doubt I can manage them all, so if you feel like solving something, message me. In general, I take inspiration from the Java Time API. The API as such is of course object-oriented, but it is also very feature-rich. So I strive to get in as many features as possible, staying close to their terminology.

  • Basic data types for date and time
    • local, with offset, or with time zone
    • support for gregorian calendar
    • extensible for other systems
  • Include other calendar systems
  • A flexible parser system
    • support ISO 8601 including variants
    • allow to customize/combine parser or write new ones
  • A customizable formatter system
    • include ISO 8601 by default
    • allow full customization
    • (maybe) add internationalization

About

An extensible date time library for Elm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published