haskell / time

A time library
http://hackage.haskell.org/package/time
Other
118 stars 78 forks source link

Formatting for quarters #255

Open NorfairKing opened 3 months ago

NorfairKing commented 3 months ago

There is now https://hackage.haskell.org/package/time-1.14/docs/Data-Time-Calendar-Quarter.html (yay!) but I don't see a way to do this:

> formatTime defaultTimeLocale "%Y-Q%Quarter" (fromGregorian 2024-04-30)
2024-Q2
AshleyYakeley commented 3 months ago

I think all the single letters are taken, so probably use %EQ or %Eq for this.