- The 'dateformat' settings now default to the ISO-8601 standard of 'Y-M-D'.
This commit is contained in:
Paul Beckingham 2013-03-30 17:42:45 -04:00
parent 0fd3ddbe57
commit 03cb5af7be
23 changed files with 50 additions and 31 deletions

View file

@ -13,6 +13,7 @@ Features
+ Adds a new 'sync' verbosity token, which will reminds when a backlog builds
up and needs a sync.
+ Supports IPv4 and IPv6 server addresses.
+ The 'dateformat' settings now default to the ISO-8601 standard of 'Y-M-D'.
Bugs
+ Fixed bug #1197 so that 'tasksh' now recognized Ctrl-D to exit.

1
NEWS
View file

@ -3,6 +3,7 @@ New Features in taskwarrior 2.3.0
- New task server sync capabilities.
- New shell with Readline support.
- The 'dateformat' settings now default to the ISO-8601 standard of 'Y-M-D'.
New commands in taskwarrior 2.3.0

View file

@ -468,19 +468,19 @@ Enables the extension system. Defaults to on.
.SS DATES
.TP
.B dateformat=m/d/Y
.B dateformat=Y-M-D
.TP
.B dateformat.report=m/d/Y
.B dateformat.report=
.TP
.B dateformat.holiday=YMD
.TP
.B dateformat.edit=m/d/Y H:N:S
.B dateformat.edit=Y-M-D H:N:S
.TP
.B dateformat.info=m/d/Y H:N:S
.B dateformat.info=Y-M-D H:N:S
.TP
.B dateformat.annotation=m/d/Y
.B dateformat.annotation=
.TP
.B report.X.dateformat=m/d/Y
.B report.X.dateformat=Y-M-D
This is a string of characters that defines how taskwarrior formats date values.
The precedence order for the configuration variable is report.X.dateformat then
dateformat.report then dateformat for formating the due dates in reports.
@ -489,7 +489,8 @@ will be applied
to the date. Entered dates as well as all other displayed dates in reports
are formatted according to dateformat.
The default value is: m/d/Y. The string can contain the characters:
The default value is the ISO-8601 standard: Y-M-D. The string can contain the
characters:
.RS
.RS

View file

@ -108,12 +108,12 @@ std::string Config::_defaults =
"abbreviation.minimum=2 # Shortest allowed abbreviation\n"
"\n"
"# Dates\n"
"dateformat=m/d/Y # Preferred input and display date format\n"
"dateformat=Y-M-D # Preferred input and display date format\n"
"dateformat.holiday=YMD # Preferred input date format for holidays\n"
"dateformat.edit=m/d/Y H:N:S # Preferred display date format when editing\n"
"dateformat.info=m/d/Y H:N:S # Preferred display date format for information\n"
"dateformat.report=m/d/Y # Preferred display date format for reports\n"
"dateformat.annotation=m/d/Y # Preferred display date format for annotations\n"
"dateformat.edit=Y-M-D H:N:S # Preferred display date format when editing\n"
"dateformat.info=Y-M-D H:N:S # Preferred display date format for information\n"
"dateformat.report= # Preferred display date format for reports\n"
"dateformat.annotation= # Preferred display date format for annotations\n"
"weekstart=Sunday # Sunday or Monday only\n"
"displayweeknumber=yes # Show week numbers on calendar\n"
"due=7 # Task is considered due in 7 days\n"

View file

@ -40,7 +40,8 @@ if (open my $fh, '>', 'annotate.rc')
"report.rrr.description=rrr\n",
"report.rrr.columns=id,description\n",
"report.rrr.sort=id+\n",
"color=off\n";
"color=off\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'annotate.rc', 'Created annotate.rc');
}

View file

@ -33,7 +33,8 @@ use Test::More tests => 4;
# Create the rc file.
if (open my $fh, '>', 'bug.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'bug.rc', 'Created bug.rc');
}

View file

@ -34,7 +34,7 @@ use Test::More tests => 4;
if (open my $fh, '>', 'bug.rc')
{
print $fh "data.location=.\n",
"dateformat=m/d/Y\n",
"dateformat.info=m/d/Y\n",
"confirmation=no\n";
close $fh;
ok (-r 'bug.rc', 'Created bug.rc');

View file

@ -47,7 +47,7 @@ qx{../src/task rc:bug.rc add wait:\\"Wed Jan 01 2020\\" A buggy task 2>&1};
# Result: Immediately delete the created task
my $output = qx{../src/task rc:bug.rc waiting 2>&1};
like ($output, qr/1\/1\/2020/ms, 'a b D Y dateformat correctly parsed.');
like ($output, qr/Jan 01 2020/ms, 'a b D Y dateformat correctly parsed.');
# Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data bug.rc);

View file

@ -33,7 +33,8 @@ use Test::More tests => 13;
# Create the rc file.
if (open my $fh, '>', 'annual.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'annual.rc', 'Created annual.rc');
}

View file

@ -36,7 +36,8 @@ if (open my $fh, '>', 'before.rc')
{
print $fh "data.location=.\n",
"confirmation=no\n",
"dateformat=m/d/Y\n";
"dateformat=m/d/Y\n",
"dateformat.info=m/d/Y\n";
close $fh;
ok (-r 'before.rc', 'Created before.rc');
}

View file

@ -34,7 +34,8 @@ use Test::More tests => 5;
if (open my $fh, '>', 'range.rc')
{
print $fh "data.location=.\n",
"confirmation=no\n";
"confirmation=no\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'range.rc', 'Created range.rc');
}

View file

@ -35,7 +35,8 @@ if (open my $fh, '>', 'color.rc')
{
print $fh "data.location=.\n",
"color.due=red\n",
"_forcecolor=1\n";
"_forcecolor=1\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'color.rc', 'Created color.rc');
}

View file

@ -35,7 +35,8 @@ if (open my $fh, '>', 'color.rc')
{
print $fh "data.location=.\n",
"color.due.today=red\n",
"_forcecolor=1\n";
"_forcecolor=1\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'color.rc', 'Created color.rc');
}

View file

@ -35,7 +35,8 @@ if (open my $fh, '>', 'color.rc')
{
print $fh "data.location=.\n",
"color.overdue=red\n",
"_forcecolor=1\n";
"_forcecolor=1\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'color.rc', 'Created color.rc');
}

View file

@ -34,7 +34,7 @@ use Test::More tests => 4;
if (open my $fh, '>', 'iso.rc')
{
print $fh "data.location=.\n",
"dateformat=m/d/Y\n";
"dateformat.info=m/d/Y\n";
close $fh;
ok (-r 'iso.rc', 'Created iso.rc');
}

View file

@ -37,7 +37,8 @@ if (open my $fh, '>', 'default.rc')
"default.command=list\n",
"default.project=PROJECT\n",
"default.priority=M\n",
"default.due=eom\n";
"default.due=eom\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'default.rc', 'Created default.rc');
}

View file

@ -39,7 +39,8 @@ if (open my $fh, '>', 'denotate.rc')
"confirmation=off\n",
"report.rrr.description=rrr\n",
"report.rrr.columns=id,description\n",
"report.rrr.sort=id+\n";
"report.rrr.sort=id+\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'denotate.rc', 'Created denotate.rc');
}

View file

@ -33,7 +33,8 @@ use Test::More tests => 13;
# Create the rc file.
if (open my $fh, '>', 'import.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'import.rc', 'Created import.rc');
}

View file

@ -33,7 +33,8 @@ use Test::More tests => 16;
# Create the rc file.
if (open my $fh, '>', 'import.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'import.rc', 'Created import.rc');
}

View file

@ -36,7 +36,8 @@ if (open my $fh, '>', 'roundtrip.rc')
print $fh "data.location=.\n",
"verbose=off\n",
"confirmation=no\n",
"defaultwidth=100\n";
"defaultwidth=100\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'roundtrip.rc', 'Created roundtrip.rc');
}

View file

@ -34,7 +34,8 @@ use Test::More tests => 26;
if (open my $fh, '>', 'seq.rc')
{
print $fh "data.location=.\n",
"confirmation=off\n";
"confirmation=off\n",
"dateformat.annotation=m/d/Y\n";
close $fh;
ok (-r 'seq.rc', 'Created seq.rc');
}

View file

@ -40,7 +40,8 @@ if (open my $fh, '>', 'uda.rc')
"report.uda.description=UDA Test\n",
"report.uda.columns=id,extra,description\n",
"report.uda.sort=extra,description\n",
"report.uda.labels=ID,Extra,Description\n";
"report.uda.labels=ID,Extra,Description\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'uda.rc', 'Created uda.rc');
}

View file

@ -33,7 +33,8 @@ use Test::More tests => 26;
# Create the rc file.
if (open my $fh, '>', 'uuid.rc')
{
print $fh "data.location=.\n";
print $fh "data.location=.\n",
"dateformat=m/d/Y\n";
close $fh;
ok (-r 'uuid.rc', 'Created uuid.rc');
}