Is anyone aware of a library I can use in React that converts locale aware time interval to either Date interval or a number (e.g., a number of seconds). For instance:
"2min" -> 120
"2 minutes" -> 120
"2 Minuten" -> 120 (locale: de)
and so on.
Can do it myself of course, but feels like a thing that someone has already done before...
PS. I am using date-fns
to do the opposite conversion.