I'm working on a ReasonReact project and I need to get the current year with the Js.Date module
I created a function to get a range between two years, so I need to pass the current year as the second parameter
let rangeYears = (startedYear, currentYear) =>
Belt_Array.range(startedYear, currentYear) ->
Array.to_list
|> List.map(
year => FormFieldSelect.{label: Js.Int.toString(year), value: `Int(year)}
)