I have a ISO8601 duration string. ex. "PT1M14S" I want to convert this to seconds (Int) using date-fns package in typescript
One solution is provided by package: iso8601-duration So we could do something like
import { parse, toSeconds } from 'iso8601-duration';
toSeconds(parse("PT1M14S"))
Please let me know date-fns provides any solution for this