Skip to content

Commit

Permalink
Merge branches 'kpihus/bug/isBusinesDay' and 'master' of https://gith…
Browse files Browse the repository at this point in the history
…ub.com/kpihus/moment-business-days into kpihus/bug/isBusinesDay

# Conflicts:
#	index.js
#	tests/test.js
  • Loading branch information
Kristjan Pihus committed May 18, 2017
1 parent cc08818 commit 766d69e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ moment.locale('us', {

### Methods:

**businessDiff(date)**

Will calculate number of business days between dates.
````javascript
var diff = moment('05-01-2017').businessDiff(moment('2017-05-31 00:00:00'))
// businessDiff paremeter must be an moment object.

````

**businessAdd(days)**

Expand Down
4 changes: 4 additions & 0 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ describe('Moment Business Days', function () {
var diff = moment('05-15-2017', 'MM-DD-YYYY').businessDiff(moment('05-08-2017','MM-DD-YYYY'))
expect(diff).to.eql(5)
});
it('...and in reverse order', function(){
var diff = moment('05-08-2017', 'MM-DD-YYYY').businessDiff(moment('05-15-2017','MM-DD-YYYY'))
expect(diff).to.eql(5)
});
it('Should calculate nr of business days with custom workingdays', function(){
moment.updateLocale('us',{
workingWeekdays: [1,2,3,4,5,6]
Expand Down

0 comments on commit 766d69e

Please sign in to comment.