Punctual.swift alternatives and similar libraries
Based on the "Date & Time" category.
Alternatively, view Punctual.swift alternatives based on common mentions on social networks and blogs.
-
SwiftDate
๐ Toolkit to parse, validate, manipulate, compare and display dates, time & timezones in Swift. -
NSDate-TimeAgo
A "time ago", "time since", "relative date", or "fuzzy date" category for NSDate and iOS, Objective-C, Cocoa Touch, iPhone, iPad. -
SwiftMoment
A time and calendar manipulation library written in Swift 2 -
Schedule
Schedule timing task in Swift using a fluent API. (A friendly alternative to Timer) -
TrueTime
NTP library for Swift and Objective-C. Get the true time impervious to device clock changes. -
iso-8601-date-formatter
A Cocoa NSFormatter subclass to convert dates to and from ISO-8601-formatted strings. Supports calendar, week, and ordinal formats. -
10Clock
This Control is a beautiful time-of-day picker heavily inspired by the iOS 10 "Bedtime" timer. -
Solar
A Swift micro library for generating Sunrise and Sunset times. -
TimeZonePicker
A TimeZonePicker UIViewController similar to the iOS Settings app. Search and select from a range of cities and countries to find your most suitable time zone. -
EmojiTimeFormatter
๐ Format your dates/times as emojis.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Punctual.swift or a related project?
README
Punctual
Swift dates, more fun. Heavily inspired by ObjectiveSugar
Installation
Punctual is available through the Swift Package Manager!
Just add this as a dependency in your Package.swift
:
.Package(url: "https://github.com/harlanhaskins/Punctual.swift.git", majorVersion: 1)
Contents
Punctual
extends Int
, NSDateComponents
, NSDate
, and NSCalendarUnit
, and adds features to make them work well together. It uses the robust NSCalendar
APIs, so you can be sure it's accurate!
print(1.day.ago)
// Optional(2015-04-08 04:49:30 +0000)
print(10.days.until(Date()))
// Optional(2015-03-30 04:11:03 +0000)
print((1.day + 2.months - 9.years).ago)
// Optional(2024-02-08 18:28:26 +0000)
print(Date() - 1.day.ago!)
print(1.year.timeInterval)
// Optional(31622400.0)
print((Date() + 30.minutes)!.nearestHour)
// 1
print(4.years.fromNow?.longTimeString)
// Optional("12:11:44 AM EDT")
print(4.years.fromNow?.stringWithFormat("HH:mm"))
// Optional("00:11")