If you use the script I posted earlier, there’s a spot where you can add your own code. I used @riverwolf’s greeting code for this:
// Get the current date
const date = new Date()
// Format the greeting (thank you riverwolf)
let greeting = "Good "
if (date.getHours() < 6) {
greeting = greeting + "night."
} else if (date.getHours() < 12) {
greeting = greeting + "morning."
} else if (date.getHours() < 17) {
greeting = greeting + "afternoon."
} else if (date.getHours() < 21) {
greeting = greeting + "evening."
} else {
greeting = greeting + "night."
}
// Format the date
let df = new DateFormatter()
df.dateFormat = "EEEE, MMMM d"
// Format the widget
widget.addSpacer(40)
let greetingText = widget.addText(greeting)
greetingText.font = Font.boldSystemFont(36)
greetingText.textColor = Color.white()
let dateText = widget.addText(df.string(date))
dateText.font = Font.regularSystemFont(18)
dateText.textColor = Color.white()
widget.addSpacer()
I think it looks pretty similar:
