Skip to content

Commit

Permalink
Merge 4caf3f0 into 7987798
Browse files Browse the repository at this point in the history
  • Loading branch information
travoul committed Nov 1, 2018
2 parents 7987798 + 4caf3f0 commit 4461d0d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Expand Up @@ -65,7 +65,7 @@ exports.nextBusinessDay = function(country, anchorDate, options) {
return exports.isBusinessDay(country, day, options)
.then(function(isBusinessDay) {
if (isBusinessDay) {
return day.toDate();
return day.startOf('day').toDate();
}

return iterate(day.add(1, 'd'));
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "business-moment",
"version": "1.1.5",
"version": "1.1.6",
"description": "Business calendar momentjs plugin",
"main": "lib/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion test/query.js
Expand Up @@ -27,7 +27,7 @@ describe('Query', function() {

describe('nextBusinessDay', function() {
it('should return the correct day', function() {
return expect(bm.nextBusinessDay('brazil', new Date(2016, 1, 5, 10))).to.eventually.eql(new Date(2016, 1, 10, 10));
return expect(bm.nextBusinessDay('brazil', new Date(2016, 1, 5, 10))).to.eventually.eql(new Date(2016, 1, 10, 2));
});
});
});
Expand Down

0 comments on commit 4461d0d

Please sign in to comment.