Skip to content

Instantly share code, notes, and snippets.

@carlynorama
Created September 3, 2020 18:16
Embed
What would you like to do?
All that is needed to turn the script into an iOS app
import SwiftUI
import Foundation
var dayString:String {
let dateFormatter = DateFormatter()
dateFormatter.setLocalizedDateFormatFromTemplate("EEEE")
return (dateFormatter.string(from: Date())) // "Tue, Mar 20, 2018" for en-US locale
}
struct ContentView: View {
var body: some View {
Text(dayString).font(.title)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment