npm.io
1.4.0 • Published 7 years ago

@arutkowski00/time

Licence
MIT
Version
1.4.0
Deps
0
Size
2.0 MB
Vulns
0
Weekly
0

time Build Status npm (scoped) Codacy Badge

Simple JavaScript library for parsing, displaying and manipulating date-agnostic time

Installation

Yarn:

yarn add @arutkowski00/time

npm:

npm install --save @arutkowski00/time

Usage

Simply import Time class and use it:

import { Time } from '@arutkowski00/time';

let time = new Time(8, 20); // 08:20
time = Time.fromString("9:40"); // 09:40
time.addMinutes(100); // 11:20
time.setHours(16); // 16:20

For more see documentation

Keywords