is-am-pm
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

is-am-pm

Build Status

Check whether it's a.m. or p.m. in local time. When given a number n, it is assumed that 0 <= n <= 23, which is the hour of the day on a 24-hour clock. Behavior is undefined for values of n outside that range.

Compatible with Node.js 8 or higher.

Usage

import { isAM, isPM } from 'is-am-pm';
 
isAM(new Date('1995-12-17T03:24:00')); // true
isPM(20); // true
isPM(8); // false

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i is-am-pm

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.88 kB

Total Files

11

Last publish

Collaborators

  • johnjago