libmir / mir-algorithm

Dlang Core Library
http://mir-algorithm.libmir.org
Other
174 stars 37 forks source link

extend YearMonth #431

Closed 9il closed 2 years ago

codecov-commenter commented 2 years ago

Codecov Report

Merging #431 (67d6fd2) into master (c798216) will decrease coverage by 0.31%. The diff coverage is 9.43%.

@@            Coverage Diff             @@
##           master     #431      +/-   ##
==========================================
- Coverage   91.33%   91.02%   -0.32%     
==========================================
  Files          74       74              
  Lines       17824    17880      +56     
==========================================
- Hits        16280    16275       -5     
- Misses       1544     1605      +61     
Impacted Files Coverage Δ
source/mir/date.d 86.13% <9.43%> (-4.26%) :arrow_down:
source/mir/bignum/internal/dec2float.d 82.60% <0.00%> (+1.18%) :arrow_up:

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 c798216...67d6fd2. Read the comment docs.

9il commented 2 years ago

The YearMonth constructor overload with Quarter has been removed because of conflict with another constructor

jmh530 commented 2 years ago

It might also be good if YearMonthDay had an endOfMonth member function, corresponding to the YearMonth/Date member functions. There is a bit of an issue though in that both of those return a Date, but what if you want to return a YearMonthDay. I'm tempted to say that there should be two functions, one to return a Date and one to return a YearMonthDay.

9il commented 2 years ago

YearMonthDay is just an intermediate representation for some algorithms.

jmh530 commented 2 years ago

So long as it is public, people would (or could) use it...

In the back of my mind, I am just thinking about how useful I find the EOMONTH function in Excel, which basically chains add!"month" and endOfMonth together.