moment-business
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "moment-business", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"homepage": "https://github.com/jmeas/moment-business", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -7,3 +7,3 @@ (function (root, factory) { | ||
var containedPeriodicValues = require("contained-periodic-values"); | ||
factory(); | ||
factory(moment, containedPeriodicValues); | ||
} else { | ||
@@ -10,0 +10,0 @@ factory(root.moment, root.containedPeriodicValues); |
@@ -1,2 +0,2 @@ | ||
!function(a,b){if("function"==typeof define&&define.amd)define(["moment","contained-periodic-values"],b);else if("undefined"!=typeof exports){{require("moment"),require("contained-periodic-values")}b()}else b(a.moment,a.containedPeriodicValues)}(this,function(a,b){"use strict";var c=function(a){return a=+a,0===a||isNaN(a)?a:a>0?1:-1};a.fn.weekDays=function(a){var c=a.day(),d=Math.abs(this.diff(a,"days")),e=b(c,d+c,0,7),f=b(c,d+c,6,7);return d-(f+e)},a.fn.weekendDays=function(a){return Math.abs(this.diff(a,"days"))-this.weekDays(a)},a.fn.addWorkDays=function(a){if(0===a)return this;var b=c(a),d=this.day(),e=Math.abs(a),f=0;0===d&&-1===b?f=1:6===d&&1===b&&(f=1);var g=e;0!==d&&6!==d&&b>0?g+=d:0!==d&&6!==d&&0>b&&(g+=6-d);var h=Math.max(Math.floor(g/5)-1,0)+(g>5&&g%5>0?1:0);return f+=e+2*h,this.add(b*f,"days"),this},a.fn.subtractWorkDays=function(a){return this.addWorkDays(-a)}}); | ||
!function(a,b){if("function"==typeof define&&define.amd)define(["moment","contained-periodic-values"],b);else if("undefined"!=typeof exports){var c=require("moment"),d=require("contained-periodic-values");b(c,d)}else b(a.moment,a.containedPeriodicValues)}(this,function(a,b){"use strict";var c=function(a){return a=+a,0===a||isNaN(a)?a:a>0?1:-1};a.fn.weekDays=function(a){var c=a.day(),d=Math.abs(this.diff(a,"days")),e=b(c,d+c,0,7),f=b(c,d+c,6,7);return d-(f+e)},a.fn.weekendDays=function(a){return Math.abs(this.diff(a,"days"))-this.weekDays(a)},a.fn.addWorkDays=function(a){if(0===a)return this;var b=c(a),d=this.day(),e=Math.abs(a),f=0;0===d&&-1===b?f=1:6===d&&1===b&&(f=1);var g=e;0!==d&&6!==d&&b>0?g+=d:0!==d&&6!==d&&0>b&&(g+=6-d);var h=Math.max(Math.floor(g/5)-1,0)+(g>5&&g%5>0?1:0);return f+=e+2*h,this.add(b*f,"days"),this},a.fn.subtractWorkDays=function(a){return this.addWorkDays(-a)}}); | ||
//# sourceMappingURL=moment-business.min.js.map |
{ | ||
"name": "moment-business", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Methods to work with week days and weekends in moment.", | ||
@@ -5,0 +5,0 @@ "main": "dist/moment-business.js", |
@@ -7,3 +7,3 @@ (function(root, factory) { | ||
var containedPeriodicValues = require('contained-periodic-values'); | ||
factory(); | ||
factory(moment, containedPeriodicValues); | ||
} else { | ||
@@ -10,0 +10,0 @@ factory(root.moment, root.containedPeriodicValues); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72722