Bindings for Intl

I’ve been working on bindings for the Intl object here: GitHub - pete-murphy/purescript-js-intl: Low-level bindings for the `Intl` object (published to Pursuit here: purescript-js-intl - Pursuit). I would love to hear feedback if anyone has a use case for it. I don’t use PureScript professionally and I’ve only had occasion to use the library a little bit in side projects.

Example usage (printing a formatted date) looks like

  locale <- Locale.new_ "en-US"
  format <- DateTimeFormat.new_ [ locale ]
    (DateTimeFormat.format format (d :: DateTime))

I think it could be a good candidate for purescript-contrib if there’s interest in having it there (once I get it into compliance with the library guidelines).


I worked on a very similar one for dates, but it’s very cool to see to see this covering most (if not all) the Intl space.

1 Like