mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-12 17:10:26 -07:00
feat: v0.0.5
This commit is contained in:
parent
4c4ebc593d
commit
242a82ad8c
36 changed files with 694 additions and 174 deletions
|
|
@ -86,5 +86,17 @@ const hexToHSL = (hex: string): hsl => {
|
|||
};
|
||||
};
|
||||
|
||||
export {hexToHSL}
|
||||
const timeListenedString = (seconds: number) => {
|
||||
if (!seconds) return ""
|
||||
|
||||
if (seconds > (120 * 60) - 1) {
|
||||
let hours = Math.floor(seconds / 60 / 60)
|
||||
return `${hours} hours listened`
|
||||
} else {
|
||||
let minutes = Math.floor(seconds / 60)
|
||||
return `${minutes} minutes listened`
|
||||
}
|
||||
}
|
||||
|
||||
export {hexToHSL, timeListenedString}
|
||||
export type {hsl}
|
||||
Loading…
Add table
Add a link
Reference in a new issue