Skip to content
/ Dawn Public

πŸ“… Tiny library to make using `Date` easier. Written in Swift.

License

Notifications You must be signed in to change notification settings

Meniny/Dawn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Meet Dawn

Dawn

Author EMail MIT
Version Platforms Swift
Build Passing Cocoapods Carthage SPM

🏡 Introduction

Dawn is a tiny library to make using `Date` easier. Written in Swift.

πŸ“‹ Requirements

Type Requirement

Platform

iOS

8.0+

macOS

10.10

tvOS

9.0

watchOS

2.0

Linux

N/A

IDE

Xcode

9.3+

Language

Swift

4.1+

πŸ“² Installation

CocoaPods

Dawn is available on CocoaPods.

use_frameworks!
pod 'Dawn'

Manually

Copy all files in the Dawn directory into your project.

πŸ›Œ Dependency

N/A

❀️ Contribution

You are welcome to fork and submit pull requests.

πŸ”– License

Dawn is open-sourced software, licensed under the MIT license.

πŸ”« Usage

import Dawn

let now = Date()
print("now: \(now)")
print("now.isToday: \(now.isToday)")
print("now.isWeekend: \(now.isWeekend)")
print("now is: \(now.weekdayName.name)")

let nextDay = now.adding(days: 1)
print("nextDay: \(nextDay)")
print("nextDay.isTomorrow: \(nextDay.isTomorrow)")

let later = Today.compare(date: nextDay, ifLater: now)
print("nextDay is isLaterThan now: \(later)")

let todayInNextYear = Today.dateByAdding(1, of: .year, to: now)
print("todayInNextYear: \(String(describing: todayInNextYear))")

About

πŸ“… Tiny library to make using `Date` easier. Written in Swift.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages