All Projects → naoty → Timepiece

naoty / Timepiece

Licence: mit
Intuitive date handling in Swift

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Timepiece

Time
Building a better date/time library for Swift
Stars: ✭ 1,983 (-25.37%)
Mutual labels:  date
Lightpick
(deprecated) Check out the new date picker Litepicker
Stars: ✭ 204 (-92.32%)
Mutual labels:  date
Vuejs Datepicker
A simple Vue.js datepicker component. Supports disabling of dates, inline mode, translations
Stars: ✭ 2,529 (-4.82%)
Mutual labels:  date
Things Calendar
Simple but elegant datepicker for the web — inspired by Things for mac
Stars: ✭ 165 (-93.79%)
Mutual labels:  date
React Native Modal Datetime Picker
A React-Native datetime-picker for Android and iOS
Stars: ✭ 2,412 (-9.22%)
Mutual labels:  date
Sonataintlbundle
Symfony SonataIntlBundle
Stars: ✭ 212 (-92.02%)
Mutual labels:  date
Server Date
Make the server's clock available in the browser.
Stars: ✭ 157 (-94.09%)
Mutual labels:  date
Flatpickr
lightweight, powerful javascript datetimepicker with no dependencies
Stars: ✭ 14,575 (+448.55%)
Mutual labels:  date
Vuetify Daterange Picker
The missing date range picker for Vuetify JS you have been looking for.
Stars: ✭ 192 (-92.77%)
Mutual labels:  date
Tj
stdin line timestamps. single binary, no dependencies. osx & linux & windows. plays well with jq.
Stars: ✭ 218 (-91.8%)
Mutual labels:  date
Brpickerview
BRPickerView 封装的是iOS中常用的选择器组件,主要包括:日期选择器(支持年月日、年月等15种日期样式选择,支持设置星期、至今等)、地址选择器(支持省市区、省市、省三种地区选择)、自定义字符串选择器(支持单列、多列、二级联动、三级联动选择)。支持自定义主题样式,适配深色模式,支持将选择器组件添加到指定容器视图。
Stars: ✭ 2,149 (-19.12%)
Mutual labels:  date
Dpicker
A framework-agnostic minimal date picker
Stars: ✭ 187 (-92.96%)
Mutual labels:  date
Datepicker
Get a date with JavaScript! A datepicker with no dependencies.
Stars: ✭ 212 (-92.02%)
Mutual labels:  date
Xk Time
xk-time 是时间转换,时间计算,时间格式化,时间解析,日历,时间cron表达式和时间NLP等的工具,使用Java8,线程安全,简单易用,多达70几种常用日期格式化模板,支持Java8时间类和Date,轻量级,无第三方依赖。
Stars: ✭ 162 (-93.9%)
Mutual labels:  date
Jest Date Mock
🌗 Mock `Date` when run unit test cases with jest. Make tests of Date easier.
Stars: ✭ 224 (-91.57%)
Mutual labels:  date
Fecha
Lightweight and simple JS date formatting and parsing
Stars: ✭ 1,955 (-26.42%)
Mutual labels:  date
Persiandate
Persian date for android
Stars: ✭ 205 (-92.28%)
Mutual labels:  date
Jiffy
Jiffy is a Flutter (Android, IOS and Web) date time package inspired by momentjs for parsing, manipulating, querying and formatting dates
Stars: ✭ 238 (-91.04%)
Mutual labels:  date
Calendarview
A highly customizable calendar library for Android, powered by RecyclerView.
Stars: ✭ 2,862 (+7.72%)
Mutual labels:  date
Go Naturaldate
Natural date/time parsing for Go.
Stars: ✭ 217 (-91.83%)
Mutual labels:  date

Timepiece CocoaPods Compatible Build Status

Intuitive date handling in Swift

Features

  • 💡 Intuitive: Timepiece provides a set of helpers to make date handling easier.
  • 🕘 Correct: Using Foundation API correctly, Timepiece helps to calculate dates correctly without deep understanding.
  • 📦 Small: Timepiece has only 4 file. You can read the inside of this easily.

Requirements

  • Swift 3.0+
  • iOS 8.0+ / macOS 10.9+ / tvOS 9.0+ / watchOS 2.0+

Usage

Initialization

Date(era: 235, year: 26, month: 8, day: 14, hour: 20, minute: 25, second: 43, nanosecond: 0, on: Calendar(identifier: .japanese))
Date(year: 2014, month: 8, day: 14, hour: 20, minute: 25, second: 43, nanosecond: 0)
Date(year: 2014, month: 8, day: 14, hour: 20, minute: 25, second: 43)
Date(year: 2014, month: 8, day: 14)

Date.today()
Date.yesterday()
Date.tomorrow()

Calculation

now + 1.year
now - 2.months
now + (3.weeks - 4.days + 5.hours)

1.year.later
1.year.ago

Change

now.changed(year: 2014)
now.changed(weekday: 1)
now.truncated([.minute, .second, .nanosecond])
now.truncated(from: .day)

Formating

now.stringIn(dateStyle: .long, timeStyle: .medium)
now.dateString(in: .medium)
now.timeString(in: .short)

3.days.string(in: .full)

Parsing

"2014/8/14".date(inFormat: "yyyy/MM/dd")
"2014-08-14T20:25:43+0900".dateInISO8601Format()

Installation

CocoaPods

# Podfile
pod "Timepiece"

Carthage

# Cartfile
github "naoty/Timepiece"

Contribution

  1. Fork
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

Timepiece is available under the MIT license. See the LICENSE file for more info.

Author

naoty

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].