Open tomers opened 3 years ago
Oh, I guess I haven't RTFM it...
import { HumanizeDurationLanguage, HumanizeDuration } from 'humanize-duration-ts'
const langService: HumanizeDurationLanguage = new HumanizeDurationLanguage()
const humanizer = new HumanizeDuration(langService)
...
const durationStr: string = humanizer.humanize(1000)
Maybe turn this issue into a feature request to support a short notation, i.e. to allow writing the above code in the abbreviated form of (assuming default language):
import { HumanizeDuration } from 'humanize-duration-ts'
...
const durationStr: string = HumanizeDuration(1000)
The above code results in the following error:
Version: