Convert seconds to hours, minutes and seconds (JavaScript)

This is JavaScript implementation of the PHP function previously described in Convert seconds to hours, minutes and seconds (PHP). Please see the link for more detailed explanation of the function.

Convert size in bytes to human readable format (JavaScript)

This is JavaScript implementation of the function described in my earlier article Convert size in bytes to a human readable format (PHP). Please see the link for more in-depth explanation of the function workflow.

Convert size in bytes to a human readable format (PHP)

Another day and another function. This time a function, which converts size in bytes to a human readable format. For example, 1024 will become "1KB", but 1048576 will become "1MB".

You can also specify the precision that you want the number to formated with. For example, if $bytes variable was originally 1,000,000 bytes then the result would be "976.56 KB" if the precision set to 2 or "976 KB" if set to 0.

Convert seconds to hours, minutes and seconds (PHP)

Here is a small function that converts number of seconds to an array containing hours, minutes and seconds separately.

Showing 1 - 4 of 4 results