This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let testDate = "2019-08-14".asDate(format: "yyyy-MM-dd") | |
print(testDate) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
/** | |
Gets a specific day in a week of a given date | |
- parameters: | |
- dayNumber: One day of the week, being 1 for Sunday until 7 for Saturday | |
- of: Date to work | |
- format: Output format desired | |
*/ | |
extension Date { |