Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #587: Replaced add method for setMonth method #589

Closed
wants to merge 1 commit into from

Conversation

naulacambra
Copy link
Contributor

It seems setQuarter logic had a wrong method call.

Fix it, and added some test to reproduce the original issue

@codecov-io
Copy link

codecov-io commented May 7, 2019

Codecov Report

Merging #589 into dev will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff         @@
##            dev   #589   +/-   ##
===================================
  Coverage   100%   100%           
===================================
  Files       154    154           
  Lines       983    983           
  Branches    140    140           
===================================
  Hits        983    983
Impacted Files Coverage Δ
src/plugin/quarterOfYear/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de14682...ca2e7a1. Read the comment docs.

@@ -4,7 +4,7 @@ export default (o, c) => {
const proto = c.prototype
proto.quarter = function (quarter) {
if (!this.$utils().u(quarter)) {
return this.add((quarter - 1) * 3, M)
return this.month(((quarter - 1) * 3) + (this.month() % 3), M)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed that you already have a fix here. But the 2nd argument M seems unnecessary.

@iamkun
Copy link
Owner

iamkun commented May 7, 2019

#591 close

@iamkun iamkun closed this May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants