Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughbe/date-previous
A library that lets you get the previous day of week from a given date.
https://github.com/hughbe/date-previous
Last synced: 17 days ago
JSON representation
A library that lets you get the previous day of week from a given date.
- Host: GitHub
- URL: https://github.com/hughbe/date-previous
- Owner: hughbe
- License: mit
- Created: 2018-02-16T13:44:12.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-16T13:45:42.000Z (almost 7 years ago)
- Last Synced: 2024-12-11T15:03:27.457Z (about 1 month ago)
- Language: Swift
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Date+Previous
A library that lets you get the previous day of week from a given date.
[![CI Status](http://img.shields.io/travis/hughbe/Date-Previous?style=flat)](https://travis-ci.org/hughbe/Date-Previous)
[![Version](https://img.shields.io/cocoapods/v/Date+Previous?style=flat)](http://cocoapods.org/pods/Date+Previous)
[![License](https://img.shields.io/cocoapods/l/Date+Previous?style=flat)](http://cocoapods.org/pods/Date+Previous)
[![Platform](https://img.shields.io/cocoapods/p/Date+Previous?style=flat)](http://cocoapods.org/pods/Date+Previous)## Usage
```swift
import Date_Previouslet date = Date() // E.g 2018-02-13
let previousMonday = date.previous(dayOfWeek: DayOfWeek.Monday) // E.g. 2018-02-12
```## Installation
Date+Previous is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'Date+Previous'
```