All Projects → xvw → kronos

xvw / kronos

Licence: MIT license
Management of arithmetic operations on dates

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to kronos

Jiffy
Jiffy is a Flutter (Android, IOS and Web) date time package inspired by momentjs for parsing, manipulating, querying and formatting dates
Stars: ✭ 238 (+934.78%)
Mutual labels:  time, date
time machine
A date and time API for Dart
Stars: ✭ 120 (+421.74%)
Mutual labels:  time, date
Travel
Framework agnostic PHP package to control the time.
Stars: ✭ 251 (+991.3%)
Mutual labels:  time, date
Dpicker
A framework-agnostic minimal date picker
Stars: ✭ 187 (+713.04%)
Mutual labels:  time, date
temps-lite
A smart, good-looking little app which tries to speak your language the way you are used to.
Stars: ✭ 40 (+73.91%)
Mutual labels:  time, date
React Native Modal Datetime Picker
A React-Native datetime-picker for Android and iOS
Stars: ✭ 2,412 (+10386.96%)
Mutual labels:  time, date
ptera
Ptera is DateTime library for Deno
Stars: ✭ 62 (+169.57%)
Mutual labels:  time, date
Time
Building a better date/time library for Swift
Stars: ✭ 1,983 (+8521.74%)
Mutual labels:  time, date
jodaTime
Format and Parse date and time with joda layout
Stars: ✭ 67 (+191.3%)
Mutual labels:  time, date
iso8601
A fast ISO8601 date parser for Go
Stars: ✭ 122 (+430.43%)
Mutual labels:  time, date
timelite
String date and time utilities 🕙
Stars: ✭ 17 (-26.09%)
Mutual labels:  time, date
date-extractor
Extract dates from text
Stars: ✭ 58 (+152.17%)
Mutual labels:  time, date
Date
A date and time library based on the C++11/14/17 <chrono> header
Stars: ✭ 2,389 (+10286.96%)
Mutual labels:  time, date
Sonataintlbundle
Symfony SonataIntlBundle
Stars: ✭ 212 (+821.74%)
Mutual labels:  time, date
Brpickerview
BRPickerView 封装的是iOS中常用的选择器组件,主要包括:日期选择器(支持年月日、年月等15种日期样式选择,支持设置星期、至今等)、地址选择器(支持省市区、省市、省三种地区选择)、自定义字符串选择器(支持单列、多列、二级联动、三级联动选择)。支持自定义主题样式,适配深色模式,支持将选择器组件添加到指定容器视图。
Stars: ✭ 2,149 (+9243.48%)
Mutual labels:  time, date
nativescript-datetimepicker
Plugin with date and time picking fields
Stars: ✭ 26 (+13.04%)
Mutual labels:  time, date
Date Picker
📅 Custom responsive date picker widget for Android, written in Kotlin.
Stars: ✭ 146 (+534.78%)
Mutual labels:  time, date
Gostradamus
Gostradamus: Better DateTimes for Go 🕰️
Stars: ✭ 148 (+543.48%)
Mutual labels:  time, date
SonataTimelineBundle
[Abandoned] Integrates SpyTimelineBundle into Sonata
Stars: ✭ 24 (+4.35%)
Mutual labels:  time, date
lit-date
Light-weight, faster datetime formatter for modern browsers.
Stars: ✭ 33 (+43.48%)
Mutual labels:  time, date

Kronos

Kronos is a library to facilitate simple arithmetic operations between timestamps. At Dernier Cri (my ex-company), we often have to handle DateTime. Kronos was designed to avoid having to constantly convert DateTime into timestamps and vice-verça.

If you are looking for a complete library of time and date management, Kronos is (maybe) not the ideal solution, and I recommend Timex!

Kronos relies on Mizur to decorate numerical values of typing information.

The library supports Mizur arithmetic operations, Timestamps collisions, inclusions between timestamps intervals (via Mizur.Range), and truncation of timestamps. I invite you to read the full documentation for more information!

https://hexdocs.pm/kronos

Small examples

import Kronos
use Kronos.Infix # Same of Mizur.Infix

{:ok, t} = new({2010, 12, 20}, {0, 0, 0})
# You can use timestamp or DateTime.t as parameter for Kronos.new

r = t + ~t(2)day + ~t(3)hour + ~t(10)minute + ~t(13)second
IO.puts Kronos.to_string(r) # will print "2010-12-22 03:10:13Z"

Installation

If available in Hex, the package can be installed by adding kronos to your list of dependencies in mix.exs:

def deps do
  [{:kronos, "~> 1.0.0"}]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/kronos.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].