Skip to content

Latest commit

 

History

History

date

Date


MIT License

Date extensions

Table of contents

Usage

import {
  difference,
  isAfter,
  isBefore,
  isDate,
  isInvalidDate,
} from 'jsmodern/dist/date.js';
import { extend } from 'jsmodern';

extend({
  date: [
    difference,
    isAfter,
    isBefore,
    isDate,
    isInvalidDate,
  ],
});

console.log([
  Date.prototype.difference,
  Date.prototype.isAfter,
  Date.prototype.isBefore,
  Date.isDate,
  Date.isInvalidDate,
].every(n => 'function' === typeof(n)));

Available extensions

Check out API Reference.

License

MIT License © Rong Sen Ng