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

Convert NaiveDate::from_num_days_from_ce to return Result #1470

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

Zomtir
Copy link
Contributor

@Zomtir Zomtir commented Feb 28, 2024

This pull request targets the issue #1469. The implementation is based on the discussion in #1445.

  • Convert NaiveDate::from_num_days_from_ce to return Result
  • i32::checked_add() is mapped locally to an Err(Error::OutOfRange) for now

cc @pitdicker

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.34%. Comparing base (999582e) to head (bd44d85).

Additional details and impacted files
@@            Coverage Diff             @@
##            0.5.x    #1470      +/-   ##
==========================================
- Coverage   94.34%   94.34%   -0.01%     
==========================================
  Files          37       37              
  Lines       17009    17007       -2     
==========================================
- Hits        16047    16045       -2     
  Misses        962      962              

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

src/naive/date/mod.rs Outdated Show resolved Hide resolved
@pitdicker
Copy link
Collaborator

It may be for the best that you didn't start with the timestamp methods on NaiveDateTime #1471.

@pitdicker pitdicker merged commit 4d63ace into chronotope:0.5.x Feb 29, 2024
35 checks passed
@pitdicker
Copy link
Collaborator

Your first one in 🎉.

@Zomtir Zomtir deleted the from_num_days_from_ce branch February 29, 2024 14:02
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.

None yet

3 participants