Datez alternatives and similar libraries
Based on the "Utility" category.
Alternatively, view Datez alternatives based on common mentions on social networks and blogs.
-
swift-algorithm-club
Algorithms and data structures in Swift, with explanations! -
SwifterSwift
A handy collection of more than 500 native Swift extensions to boost your productivity. -
libextobjc
A Cocoa library to extend the Objective-C programming language. -
InAppSettingsKit
This iOS framework allows settings to be in-app in addition to or instead of being in the Settings app. -
DifferenceKit
💻 A fast and flexible O(n) difference algorithm framework for Swift collection. -
EKAlgorithms
EKAlgorithms contains some well known CS algorithms & data structures. -
EZSwiftExtensions
:smirk: How Swift standard types and classes were supposed to work. -
Reusable
A Swift mixin for reusing views easily and in a type-safe way (UITableViewCells, UICollectionViewCells, custom UIViews, ViewControllers, Storyboards…) -
WhatsNew
Showcase new features after an app update similar to Pages, Numbers and Keynote. -
SwiftLinkPreview
It makes a preview from an URL, grabbing all the information such as title, relevant texts and images. -
BFKit-Swift
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster. -
BFKit
BFKit is a collection of useful classes and categories to develop Apps faster. -
ReadabilityKit
Preview extractor for news, articles and full-texts in Swift -
VTAcknowledgementsViewController
Acknowledgements screen displaying a list of licenses, for example from CocoaPods dependencies. -
ObjectiveKit
Swift-friendly API for a set of powerful Objective C runtime functions. -
SwiftFoundation
Cross-Platform, Protocol-Oriented Programming base library to complement the Swift Standard Library. (Pure Swift, Supports Linux) -
AssistantKit
Easy way to detect iOS device properties, OS versions and work with screen sizes. Powered by Swift. -
DeviceGuru
DeviceGuru is a simple lib (Swift) to know the exact type of the device, e.g. iPhone 6 or iPhone 6s. Please ⭐️ this repo on the top right corner to make this repo popular. -
Retry
Haven't you wished for `try` to sometimes try a little harder? Meet `retry` -
Standard Template Protocols
Protocols for your every day iOS needs -
YAML.framework
Proper YAML support for Objective-C. Based on recommended libyaml. -
SBConstants
Generate a constants file by grabbing identifiers from storyboards in a project. -
ZamzamKit
A Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and other native frameworks.
Appwrite - The open-source backend cloud platform
* 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 Datez or a related project?
README
Datez :calendar: Breeze through Date, DateComponents, and TimeInterval
Highlights
Two Custom Structs Only (value types FTW!):
DateView
: AnDate
associated with anCalendar
CalendarComponents
: LikeDateComponents
, butCalendar
agnostic.
Absolutely Zero Hardcode: Only hardcode now is to clear the date components, by setting the value to
0
or1
. Nothing like:minutes = seconds * 60
.Modular Composition Design: Only one way to achieve something, instead of copy pasting code everywhere, with tons of head scratching.
Features
You can try them in the playground shipped with the framework!
Quickly and Explicitly Access Date Components:
let someDate = Date()
let currentCalendar = someDate.currentCalendar.components.year
let gregorianDay = someDate.gregorian.components.day
let hijriMonth = someDate.islamicCivil.components.month
Easy and Concise Date Manipulation:
let date = Date()
let gregorianDate = date.gregorian
// Adding components
let tomorrow = gregorianDate + 1.day
// Relative accessors
let firstThingTomorrow = tomorrow.beginningOfDay
// Easy tweaking
let firstThingTomorrowButIn1984 = firstThingTomorrow.update(year: 1984)
// now, lets get the date
let newDate = firstThingTomorrowButIn1984.date
Convenient Date Operators:
// Just calling timeIntervalSinceDate
let difference = Date(timeIntervalSinceNow: 5.minutes.timeInterval) - Date()
// Just calling dateByAddingTimeInterval
let afterFiftyHours = Date() + 50.hours.timeInterval
// Just calling compare:
let compareResult = Date(timeIntervalSinceNow: 8.hours.timeInterval) < Date()
[Bonus]: Durations
This is marked as bonus since it's not ideal at all for precise calculation, but super useful when you just need some convenience. Examples would be setting expiration intervals and estimating components from TimeInterval
// Easily access TimeInterval to construct durations
let expirationInterval = 300.days.timeInterval
// Convert back to a single date component
let months = expirationInterval.totalMonths // 9
// Or multiple components
let components = expirationInterval.components
// components ≈ CalendarComponents(day: 6, month: 9)
Getting Started
Swift Package Manager
TODO: Write me
CocoaPods
CocoaPods is fully supported. Simply add the following line to your Podfile:
pod 'Datez'
Submodule
For manual installation, you can grab the source directly or through git submodules, then simply:
- Drop the
Datez.xcodeproj
file as a subproject (make sureCopy resources
is not enabled) - Navigate to your root project settings. Under "Embedded Binaries", click the "+" button and select the
Datez.framework
Motivation
This framework doesn't reinvent anything Apple already built. Under the hood, it leverages the Date
, Calendar
, and DateComponents
classes to do all the work. It simply tries to simplify the API for Swift developers. Period.
After experiencing what using a great Swift API feels like, by using RealmSwift and SwiftyJSON, I started to believe in the importance of a clean and concise Swift API, and its impact on our productivity and stress levels.
What's wrong with other date libraries?
Assuming the underlying Calendar
:
I needed to explicitly choose between Gregorian and IslamicCivil, so that is integrated.
Wrong Date Calculation: Most frameworks I've seen make assumptions about the number of days in a month, or hardcode the number of hours ... etc.
Author
Mazyod (@Mazyod)
License
Datez is released under the MIT license. See LICENSE for details.
*Note that all licence references and agreements mentioned in the Datez README section above
are relevant to that project's source code only.