summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2017-09-27Do not write month adjusting with macro, but hand-craftMatthias Beyer
This fixes a bug: The month gets adjusted here, which invalidates the result of the get_num_of_days_in_month() call,... so we must call it again and again while adjusting here.
2017-09-27Add tests to add more than one larger unit in the smaller unitMatthias Beyer
2017-09-27Add test debug outputMatthias Beyer
2017-09-26Fix feature-gate-caused compiler errorsMatthias Beyer
2017-09-26Make Iter auto-calculating, eliminate CalculatingIterMatthias Beyer
It turns out that using a cheap iterator which only wraps objects makes the stack overflow with a very basic query: today() .yearly(1) .unwrap() .every(::indicator::Day::Monday) .every(::indicator::Month::January) .collect::<Vec<_>>() So here we cgo and optimize the Iter type to automatically calculate all the things right away. This makes it a bit more expensive to call, of course, but is better than overflowing.
2017-09-26Implement filter interface for matchersMatthias Beyer
2017-09-26Add filter iteratorMatthias Beyer
2017-09-26Add Matcher trait for indicatorsMatthias Beyer
2017-09-26Add IntoCalculatingIter trait for calling calculate() on all iteratorsMatthias Beyer
2017-09-25Add more testsMatthias Beyer
2017-09-25Fix weird addition bug in iteratorMatthias Beyer
The problem was the matching: We matched, in the addition branches, for a pair which we then reversed. This caused a strange bug when adding a moment and a minute. The subtraction matching was wrong as well, as it also reversed the order of the arguments.
2017-09-19Add extensions for building iterators convenientlyMatthias Beyer
2017-09-19Let the TimeType be PartialEq, Eq, PartialOrd, OrdMatthias Beyer
2017-09-19Add tests to test TT::is_in()Matthias Beyer
2017-09-19Add tests for testing TT::is_a()Matthias Beyer
2017-09-16Add types to check whether TT::Moment is weekday / in monthMatthias Beyer
2017-09-16Add additional comment to TimeType::end_of_* functionsMatthias Beyer
2017-09-16Add TimeType::today()Matthias Beyer
2017-09-16Add test for end-of-minuteMatthias Beyer
2017-09-16Add tests for end-of-hourMatthias Beyer
2017-09-16Add tests to test end-of-dayMatthias Beyer
2017-09-16Add end of {day, hour, minute}Matthias Beyer
2017-09-16Add test for adjusting over monthsMatthias Beyer
2017-09-16Add test for get_num_of_days_in_month()Matthias Beyer
2017-09-16Use get_num_of_days_in_month() for adjustingMatthias Beyer
2017-09-16Add tests for end-of-monthMatthias Beyer
2017-09-16Remove printlnsMatthias Beyer
2017-09-16Move utility functions to util packageMatthias Beyer
2017-09-16Add end-of-month type/calcMatthias Beyer
Adds util module
2017-09-15Add tests for TT::end_of_year()Matthias Beyer
2017-09-15Add EndOfYear variant to TimeTypeMatthias Beyer
2017-09-14Add tests to test adding incorrect instances to momentsMatthias Beyer
2017-09-14Add tests to test addition of more fancy values to momentMatthias Beyer
2017-09-12Add test to subtract 12 months from a momentMatthias Beyer
2017-09-12Fix subtraction: Calculate first, then subtractMatthias Beyer
2017-09-12Fix in tests: There is no day/month "0" - the minimum value is 1Matthias Beyer
2017-09-12Make error messages in sub-adjustment tests more verboseMatthias Beyer
2017-09-12Make error messages in add-adjustment tests more verboseMatthias Beyer
2017-09-12Rewrite sub adjustmentMatthias Beyer
2017-09-12Add "months with 31 days and 30 day"-fix to add-adjusting functionMatthias Beyer
2017-09-12Add test to test subtraction adjustmentMatthias Beyer
2017-09-12Add function to adjust timesMatthias Beyer
2017-09-12Revert "Optimize implementation of add/sub"Matthias Beyer
This reverts commit 63817a5a3443896cb2db8ac24ed778b5634e7fc1.
2017-09-12Fix add/sub matchingMatthias Beyer
2017-09-12Optimize implementation of add/subMatthias Beyer
2017-09-12Switch implementation back to not use chrono::DurationMatthias Beyer
Because it complicates a lot of things in our implementation. The code compiles, though the tests do not yet run successfully.
2017-09-12Add more testsMatthias Beyer
2017-09-12Add more convenience to the macros in the testsMatthias Beyer
2017-09-12Impl adding to momentMatthias Beyer
2017-09-12Add TT::get_moment()Matthias Beyer