Skip to content

Instantly share code, notes, and snippets.

View dezman's full-sized avatar

Desmond Sadler dezman

View GitHub Profile
@terryyounghk
terryyounghk / momentjs-extensions.js
Last active December 31, 2015 15:29
Extensions for momentjs This is a small extension to moment.js, and adds the ability to add/subtract number of business days, snap to nearest business day, and calculate difference in terms of business days. Note that this simply excludes Sundays and Saturdays.
/* jshint laxbreak: true */
/**
* moment.js plugin: additional methods
* businessDiff (mStartDate)
* businessAdd (numberOfDays)
* businessSubtract (numberOfDays)
* business ([false])
*/
(function () {
var moment;