โฑ๏ธconvertTime
Convert time to another format: e.g minutes to seconds
Last updated
Was this helpful?
Convert time to another format: e.g minutes to seconds
Last updated
Was this helpful?
Was this helpful?
import { convertTime } from 'the-simplifier'
let convert = async() => {
let result = await convertTime(120, {
from: 'minutes',
to: 'hours'
})
console.log(result)
}
convert() // Expected: 2
import { convertTime } from 'the-simplifier'
let convert = async() => {
let result = await convertTime(5, {
from: 'hours',
to: 'minutes'
})
console.log(result)
}
convert() // Expected: 300
import { convertTime } from 'the-simplifier'
let convert = async() => {
let result = await convertTime(5000, {
from: 'seconds',
to: 'hours'
})
console.log(result)
}
convert() // Expected: 1.388888888888889
import { convertTime } from 'the-simplifier'
let convert = async() => {
let result = await convertTime(1, {
from: 'hours',
to: 'seconds'
})
console.log(result)
}
convert() // Expected: 3600