This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var moment = require('moment'); | |
function calculateBusinessDays(firstDate, secondDate){ | |
//Initiallize variables | |
var day1 = moment(firstDate); | |
var day2 = moment(secondDate); | |
var adjust = 0; | |
if((day1.dayOfYear() === day2.dayOfYear()) && (day1.year() === day2.year())){ | |
return 0; |