mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
Code Cleanup
- Factorize code for parsing date elements. - Better order of blocks for parsing date elements. - Add corresponding minimal-digit date parsing method for reading seconds, minutes and week. - Update documentation and test.
This commit is contained in:
parent
384be4b249
commit
ec330921de
8 changed files with 116 additions and 218 deletions
|
@ -545,8 +545,8 @@ int main (int argc, char** argv)
|
|||
t.is (dt.day (), 1, "ctor (std::string) -> d");
|
||||
t.is (dt.year (), 2008, "ctor (std::string) -> y");
|
||||
|
||||
n = Nibbler ("v01 Tue 2008-01-01");
|
||||
t.ok (n.getDate ("vV a Y-M-D", ti), "vV a Y-M-D ok");
|
||||
n = Nibbler ("w01 Tue 2008-01-01");
|
||||
t.ok (n.getDate ("wV a Y-M-D", ti), "wV a Y-M-D ok");
|
||||
dt = Date (ti);
|
||||
t.is (dt.month (), 1, "ctor (std::string) -> m");
|
||||
t.is (dt.day (), 1, "ctor (std::string) -> d");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue