Skip to content

getTimeDiff()

Calculates the difference between two dates in minutes, seconds and total units.

Example:

ts
getTimeDiff(new Date('2024-03-15T12:30:00'), new Date('2024-03-15T12:00:00'));

Released under the MIT License.