Skip to content

Instantly share code, notes, and snippets.

View victorpimentel's full-sized avatar

Víctor Pimentel victorpimentel

View GitHub Profile
@johnhatvani
johnhatvani / Dates.playground
Last active March 15, 2023 10:12
Swift Playground #1 adding components to Date using operator overloading.
import Foundation
extension Int{
var day: (Int, Calendar.Component) {
return (self, .day)
}
var month: (Int, Calendar.Component) {
return (self, .month)
}