Search code examples
datetimereasonbucklescript

How to get current year?


Is there a way to get the current year in Reason? I found a library called bs-luxon, but I can't use it. I've installed it as the site says, but I don't know how to import it.

How can I use this library or other way to get the current year?


Solution

  • You can use

    Js.Date.getFullYear(Js.Date.make())