interactive
interactive copied to clipboard
Pretty print DateOnly and TimeOnly
Is your feature request related to a problem? Please describe.
DateTime has a nice pretty printer. It would be useful to have this for DateOnly and TimeOnly too. I know that I can use the object formatters to do it myself, but having it built in is easier to use.

Describe the solution you'd like Output printers for DateOnly that are like DateTime and for TimeOnly that are like TimeSpan
Such as:
Formatter.Register<DateOnly>(fun (dt: DateOnly) -> dt.ToString("o"))
Formatter.SetPreferredMimeTypesFor(typeof<DateOnly>,"text/plain")
Formatter.Register<TimeOnly>(fun (tm: TimeOnly) -> tm.ToString("o"))
Formatter.SetPreferredMimeTypesFor(typeof<TimeOnly>,"text/plain")
Describe alternatives you've considered Do it manually on every notebook.