1.0.4 • Published 12 months ago

user-local-time v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

user-local-time

A simple library to get the current time of the user's computer.

Installation

npm install user-local-time

Usage

const userLocalTime = require('user-local-time');

console.log(userLocalTime.getCurrentTime());
// Output: { hours: 14, minutes: 30, seconds: 45, milliseconds: 123 }

console.log(userLocalTime.getCurrentTimeFormatted());
// Output: "14:30:45"

API

getCurrentTime()

Returns an object with the current hours, minutes, seconds, and milliseconds.

getCurrentTimeFormatted()

Returns a string with the current time in HH:MM:SS format.

License

MIT

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago