v5.0.0
$humanizeMS
This function converts MS time into a readable duration

Fields

This function has 1 required field
  1. 1.
    MS (Required)
  2. 2.
    Limit (Optional)
  3. 3.
    Separator (Optional)
Raw Usage: $humanizeMS[ms;limit (optional);separator (optional)]

Options

  • MS - The duration in ms we're converting
  • Limit - Limit of display for the duration
  • Separator - The separator for each duration

Usage

Without the optional fields
1
bot.command({
2
name: "convert",
3
code: `
4
$humanizeMS[1207398129310]
5
`
6
//Returns: 38 years and 9 months
7
})
Copied!
With Limit optional field
1
bot.command({
2
name: "convert",
3
code: `
4
$humanizeMS[1207398129310;4]
5
`
6
//Returns: 38 years 9 months 24 days and 12 hours
7
})
Copied!
With Separator optional field
1
bot.command({
2
name: "convert",
3
code: `
4
$humanizeMS[1207398129310;4;,]
5
`
6
//Returns: 38 years, 9 months, 24 days, and 12 hours
7
})
Copied!
Last modified 1mo ago
Copy link
Edit on GitHub