Skip to content

Instantly share code, notes, and snippets.

View unferna's full-sized avatar
:shipit:
Coding!

Fernando Florez Gomez unferna

:shipit:
Coding!
View GitHub Profile
@unferna
unferna / Example.swift
Created December 7, 2019 21:25
[Convert String to Date] #Swift #String #Date
let testDate = "2019-08-14".asDate(format: "yyyy-MM-dd")
print(testDate)
@unferna
unferna / dateInWeek.swift
Last active December 7, 2019 21:17
[Day in a week] gets a specific day in a week #Swift #Date
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 {