Open hexagonal-sun opened 3 years ago
Maybe there is a more elegant solution involving type classes?
I don't think there is really, it's still going to need to be reified into types at some point. Constructing the formats could perhaps be made easier using some Inject
style classes on top, but I think it'd be fine without too probably.
Would be nice to have ready-to-go formatters for Date
and Time
types.
sorry - I did link the wrong issue - please ignore the last message here :(
Hi,
It would be nice if functions for formatting
Date
andTime
types exist. Currently, if one wants to format aDate
, a dummyTime
value needs to be be created to convert to aDateTime
for formatting; likewise for theTime
type.I'm not exactly sure what the best way to do this would be. Maybe:
The main issue I see with this approach are
FormatterCommands
that are applicable to bothDate
s andTime
s, namelyPlaceholder
andUnixTimestamp
. Maybe there is a more elegant solution involving type classes?