To convert seconds to the day , hour , and minute format, you can use the following function in JavaScript:
index.tsx262 chars8 lines
This function takes the input of seconds and returns the output in the format of the number of days, hours and minutes. For example, if you input 100000 seconds, it returns "1 day(s) 4 hour(s) 26 minute(s)".
You can call this function with the required seconds as input, like this:
index.tsx70 chars2 lines
gistlibby LogSnag