1.0.5 • Published 7 years ago

moment-is-zero v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Build Status

A plugin to recognize 0001-01-01T00:00:00Z or unix timestamp 0 for moment.js.

Recognizing 0001-01-01T00:00:00Z may convenient for some backend language like golang.

Install

npm install moment-is-zero --save

or

yarn add moment-is-zero

Usage

moment('0001-01-01T00:00:00Z').isZero()

or

moment.unix(0).isZero()

return value true or false.

notice:

moment('0001-01-01T00:00:00Z+08:00').isZero() is false. You need remove time zone yourself.

License

MIT

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago