You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to have a helper function for building Greetings, i.e. "Good morning", "Good afternoon", "Good evening" based on the current time.
Perhaps an extension to DateTime and TimeOnly along the lines of .ToPeriodOfDayNotation() might be the best way to implement this. It would return "morning" or "afternoon" or "evening" which could then be adapted into a greeting.
Or, could be .ToGreetingNotation() perhaps?
The text was updated successfully, but these errors were encountered:
It would be useful to have a helper function for building Greetings, i.e. "Good morning", "Good afternoon", "Good evening" based on the current time.
Perhaps an extension to
DateTime
andTimeOnly
along the lines of.ToPeriodOfDayNotation()
might be the best way to implement this. It would return "morning" or "afternoon" or "evening" which could then be adapted into a greeting.Or, could be
.ToGreetingNotation()
perhaps?The text was updated successfully, but these errors were encountered: