Is there an easy way to format DateTime Duration using dayJS or a custom function?

60 Views Asked by At

I'm looking to format the Duration specifically. So for example I want

PT1H to format to a string "1 Hour"

PT30M to format to "30 minutes"

P14D to format to 14 days

etc..

I'm actively using dayJs but was unable to find this specific use case in the documentation.

0

There are 0 best solutions below