Date extensions
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)));
Check out API Reference.
MIT License © Rong Sen Ng