Last active
January 25, 2021 01:36
-
-
Save ralph-bergmann/3286764007b71593daaa0db1a1d55745 to your computer and use it in GitHub Desktop.
This file contains 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 SwiftUI | |
import core | |
struct ContentView: View { | |
var body: some View { | |
Text("Today in one year is: \(nextYear())").padding() | |
} | |
} | |
struct ContentView_Previews: PreviewProvider { | |
static var previews: some View { | |
ContentView() | |
} | |
} |
This file contains 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 | |
import SwiftDate | |
public func nextYear() -> String { | |
let nextYear = (Date() + 1.years) | |
return nextYear.weekdayName(.default) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment