Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 398 Bytes

README.md

File metadata and controls

11 lines (9 loc) · 398 Bytes

JavaScript Current Time

A JavaScript function that returns the current time with an optional offset.

Installation

Copy 'currentTime' function directly into your JavaScript file(s) where usage is required.

Usage

var time = currentTime(offset);

Function returns the current time in HH:MM:SS am/pm format. Specify an optional offset in seconds to subtract from the current time.