1.0.4 • Published 11 months ago

user-local-time v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
11 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

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago