Skip to content

refactor: use isLeapYear #1638

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

Merged
merged 1 commit into from
Mar 7, 2024
Merged

Conversation

vil02
Copy link
Member

@vil02 vil02 commented Mar 5, 2024

Open in Gitpod know more

Describe your change:

This PR:

  • applies the isLeapYear,
  • reorganizes the tests of GetMonthDays - note the change of the year in one of the test cases (I do not want to create an illusion that this function should be uses for years before 1582).

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new JavaScript files are placed inside an existing directory.
  • All filenames should use the UpperCamelCase (PascalCase) style. There should be no spaces in filenames.
    Example:UserProfile.js is allowed but userprofile.js,Userprofile.js,user-Profile.js,userProfile.js are not
  • All new algorithms have a URL in their comments that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.94%. Comparing base (d8cfdcd) to head (66ab291).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1638   +/-   ##
=======================================
  Coverage   83.93%   83.94%           
=======================================
  Files         377      377           
  Lines       19733    19727    -6     
  Branches     2921     2918    -3     
=======================================
- Hits        16563    16559    -4     
+ Misses       3170     3168    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vil02 vil02 marked this pull request as ready for review March 5, 2024 18:21
@vil02 vil02 marked this pull request as draft March 5, 2024 18:22
@vil02 vil02 marked this pull request as ready for review March 5, 2024 18:27
@vil02 vil02 force-pushed the use_isLeapYear branch 2 times, most recently from c523049 to 5faf0a5 Compare March 5, 2024 18:34
@vil02
Copy link
Member Author

vil02 commented Mar 5, 2024

@appgurueu or @raklaptudirm could you please re-run the UploadCoverageReport (if needed). It failed due to: The server encountered a temporary error and could not complete your request.

@appgurueu
Copy link
Collaborator

(Just amended your last commit and force pushed to trigger a rerun of CI)

@vil02
Copy link
Member Author

vil02 commented Mar 5, 2024

(Just amended your last commit and force pushed to trigger a rerun of CI)

I could do the same, but I did not want to lose your approval. Thanks!

@appgurueu
Copy link
Collaborator

I could do the same, but I did not want to lose your approval. Thanks!

Heh, right. Sometimes our strict repo config frustrates me a bit.

@raklaptudirm raklaptudirm merged commit 4a4ed57 into TheAlgorithms:master Mar 7, 2024
@vil02 vil02 deleted the use_isLeapYear branch March 7, 2024 20:35
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.

4 participants