parttime
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

PartTime - time with placeholder

npm npm license npm download total npm download by month npm type definitions

Dependency Status devDependency Status Travis Build Status

SYNOPSYS

JavaScript:

var PartTime = require("parttime");
var parttime = new PartTime("*-01-01");
var now = new Date();
if (parttime.compare(now) == 0) console.log("Happy New Year!");

TypeScript:

import PartTime = require("parttime");
const parttime = new PartTime("*-01-01");
const now = new Date();
if (parttime.compare(now) == 0) console.log("Happy New Year!");

In browser:

<script src="parttime.js"></script>
<script>
var parttime = new PartTime("*-01-01");
var now = new Date();
if (parttime.compare(now) == 0) console.log("Happy New Year!");
</script> 

DESCRIPTION

PartTime represents a single moment in time with placeholder that is useful for compareing repeating moment.

Currently, PartTime does not support timezones.

new PartTime()
new PartTime("*-10-12")
new PartTime("1970-1-1")
new PartTime("1970-1-1T00:*")
new PartTime("*:00:00.000")
new PartTime("*:*:30")
new PartTime("1970-1-1T00:00:00.000")

INSTALL

node.js

npm install -g parttime

browsers

Get parttime.js by downloading dist zip or some and

<script src="parttime.js"></script>

API Document

API Document

LICENSE

(C) 2019 Narazaka : Licensed under Zlib License

Readme

Keywords

none

Package Sidebar

Install

npm i parttime

Weekly Downloads

10

Version

1.4.0

License

Zlib

Unpacked Size

19.7 kB

Total Files

4

Last publish

Collaborators

  • narazaka