Skip to content

Instantly share code, notes, and snippets.

@ralph-bergmann
Last active January 25, 2021 01:36
Show Gist options
  • Save ralph-bergmann/3286764007b71593daaa0db1a1d55745 to your computer and use it in GitHub Desktop.
Save ralph-bergmann/3286764007b71593daaa0db1a1d55745 to your computer and use it in GitHub Desktop.
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()
}
}
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