date-format
date-format copied to clipboard
Relative times with languages support
This is a bit of a daring PR out of the blue, so feel free to disagree with my decisions and/or point out issues I might not have noticed. I introduced a new module: DateFormat.Relative.Language
. Then I moved the RelativeTimeOptions
along with the default (now called english
) to that module. Finally, I localized the relative time options for Finnish.
Because of the type moved from DateFormat.Relative
to DateFormat.Relative.Language
(to avoid circular imports), this change would be a major version. If you'd really like to avoid that, there's at least two ways to do it:
- expose the type through a dummy
type alias MyType = Module.MyType
, which can be confusing for people (which one do they need to import to be able to construct a record?) - move the type back to the old place and keep an unexposed duplicate of the type in
DateFormat.Relative.Language
for type signature purposes
Note: This builds on #19, the first two commits are in common with it. 6181ece is where the actual changes happen.