mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-23 05:27:47 +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
|
@ -57,8 +57,8 @@ if (open my $fh, '>', 'date3.rc')
|
|||
"dateformat=m/d/y\n",
|
||||
"dateformat=m/d/y\n",
|
||||
"weekstart=Monday\n",
|
||||
"dateformat.info=A D B Y (vV)\n",
|
||||
"dateformat.report=A D B Y (vV)\n";
|
||||
"dateformat.info=A D B Y (wV)\n",
|
||||
"dateformat.report=A D B Y (wV)\n";
|
||||
close $fh;
|
||||
ok (-r 'date3.rc', 'Created date3.rc');
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ ok (!-r 'pending.data', 'Removed pending.data');
|
|||
|
||||
qx{../src/task rc:date3.rc add foo due:4/8/10 2>&1};
|
||||
$output = qx{../src/task rc:date3.rc list 2>&1};
|
||||
like ($output, qr/Thursday 08 April 2010 \(v14\)/, 'date format A D B Y (vV) parsed');
|
||||
like ($output, qr/Thursday 08 April 2010 \(w14\)/, 'date format A D B Y (wV) parsed');
|
||||
$output = qx{../src/task rc:date3.rc rc.dateformat.report:"D b Y - a" list 2>&1};
|
||||
like ($output, qr/08 Apr 2010 - Thu/, 'date format D b Y - a parsed');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue