mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Defaults
- The 'dateformat' settings now default to the ISO-8601 standard of 'Y-M-D'.
This commit is contained in:
parent
0fd3ddbe57
commit
03cb5af7be
23 changed files with 50 additions and 31 deletions
|
@ -13,6 +13,7 @@ Features
|
||||||
+ Adds a new 'sync' verbosity token, which will reminds when a backlog builds
|
+ Adds a new 'sync' verbosity token, which will reminds when a backlog builds
|
||||||
up and needs a sync.
|
up and needs a sync.
|
||||||
+ Supports IPv4 and IPv6 server addresses.
|
+ Supports IPv4 and IPv6 server addresses.
|
||||||
|
+ The 'dateformat' settings now default to the ISO-8601 standard of 'Y-M-D'.
|
||||||
|
|
||||||
Bugs
|
Bugs
|
||||||
+ Fixed bug #1197 so that 'tasksh' now recognized Ctrl-D to exit.
|
+ Fixed bug #1197 so that 'tasksh' now recognized Ctrl-D to exit.
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -3,6 +3,7 @@ New Features in taskwarrior 2.3.0
|
||||||
|
|
||||||
- New task server sync capabilities.
|
- New task server sync capabilities.
|
||||||
- New shell with Readline support.
|
- 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
|
New commands in taskwarrior 2.3.0
|
||||||
|
|
||||||
|
|
|
@ -468,19 +468,19 @@ Enables the extension system. Defaults to on.
|
||||||
.SS DATES
|
.SS DATES
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B dateformat=m/d/Y
|
.B dateformat=Y-M-D
|
||||||
.TP
|
.TP
|
||||||
.B dateformat.report=m/d/Y
|
.B dateformat.report=
|
||||||
.TP
|
.TP
|
||||||
.B dateformat.holiday=YMD
|
.B dateformat.holiday=YMD
|
||||||
.TP
|
.TP
|
||||||
.B dateformat.edit=m/d/Y H:N:S
|
.B dateformat.edit=Y-M-D H:N:S
|
||||||
.TP
|
.TP
|
||||||
.B dateformat.info=m/d/Y H:N:S
|
.B dateformat.info=Y-M-D H:N:S
|
||||||
.TP
|
.TP
|
||||||
.B dateformat.annotation=m/d/Y
|
.B dateformat.annotation=
|
||||||
.TP
|
.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.
|
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
|
The precedence order for the configuration variable is report.X.dateformat then
|
||||||
dateformat.report then dateformat for formating the due dates in reports.
|
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
|
to the date. Entered dates as well as all other displayed dates in reports
|
||||||
are formatted according to dateformat.
|
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
|
||||||
.RS
|
.RS
|
||||||
|
|
|
@ -108,12 +108,12 @@ std::string Config::_defaults =
|
||||||
"abbreviation.minimum=2 # Shortest allowed abbreviation\n"
|
"abbreviation.minimum=2 # Shortest allowed abbreviation\n"
|
||||||
"\n"
|
"\n"
|
||||||
"# Dates\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.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.edit=Y-M-D 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.info=Y-M-D H:N:S # Preferred display date format for information\n"
|
||||||
"dateformat.report=m/d/Y # Preferred display date format for reports\n"
|
"dateformat.report= # Preferred display date format for reports\n"
|
||||||
"dateformat.annotation=m/d/Y # Preferred display date format for annotations\n"
|
"dateformat.annotation= # Preferred display date format for annotations\n"
|
||||||
"weekstart=Sunday # Sunday or Monday only\n"
|
"weekstart=Sunday # Sunday or Monday only\n"
|
||||||
"displayweeknumber=yes # Show week numbers on calendar\n"
|
"displayweeknumber=yes # Show week numbers on calendar\n"
|
||||||
"due=7 # Task is considered due in 7 days\n"
|
"due=7 # Task is considered due in 7 days\n"
|
||||||
|
|
|
@ -40,7 +40,8 @@ if (open my $fh, '>', 'annotate.rc')
|
||||||
"report.rrr.description=rrr\n",
|
"report.rrr.description=rrr\n",
|
||||||
"report.rrr.columns=id,description\n",
|
"report.rrr.columns=id,description\n",
|
||||||
"report.rrr.sort=id+\n",
|
"report.rrr.sort=id+\n",
|
||||||
"color=off\n";
|
"color=off\n",
|
||||||
|
"dateformat=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'annotate.rc', 'Created annotate.rc');
|
ok (-r 'annotate.rc', 'Created annotate.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,8 @@ use Test::More tests => 4;
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'bug.rc')
|
if (open my $fh, '>', 'bug.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n";
|
print $fh "data.location=.\n",
|
||||||
|
"dateformat=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'bug.rc', 'Created bug.rc');
|
ok (-r 'bug.rc', 'Created bug.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ use Test::More tests => 4;
|
||||||
if (open my $fh, '>', 'bug.rc')
|
if (open my $fh, '>', 'bug.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n",
|
print $fh "data.location=.\n",
|
||||||
"dateformat=m/d/Y\n",
|
"dateformat.info=m/d/Y\n",
|
||||||
"confirmation=no\n";
|
"confirmation=no\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'bug.rc', 'Created bug.rc');
|
ok (-r 'bug.rc', 'Created bug.rc');
|
||||||
|
|
|
@ -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
|
# Result: Immediately delete the created task
|
||||||
my $output = qx{../src/task rc:bug.rc waiting 2>&1};
|
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.
|
# Cleanup.
|
||||||
unlink qw(pending.data completed.data undo.data backlog.data bug.rc);
|
unlink qw(pending.data completed.data undo.data backlog.data bug.rc);
|
||||||
|
|
|
@ -33,7 +33,8 @@ use Test::More tests => 13;
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'annual.rc')
|
if (open my $fh, '>', 'annual.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n";
|
print $fh "data.location=.\n",
|
||||||
|
"dateformat=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'annual.rc', 'Created annual.rc');
|
ok (-r 'annual.rc', 'Created annual.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,8 @@ if (open my $fh, '>', 'before.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n",
|
print $fh "data.location=.\n",
|
||||||
"confirmation=no\n",
|
"confirmation=no\n",
|
||||||
"dateformat=m/d/Y\n";
|
"dateformat=m/d/Y\n",
|
||||||
|
"dateformat.info=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'before.rc', 'Created before.rc');
|
ok (-r 'before.rc', 'Created before.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,8 @@ use Test::More tests => 5;
|
||||||
if (open my $fh, '>', 'range.rc')
|
if (open my $fh, '>', 'range.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n",
|
print $fh "data.location=.\n",
|
||||||
"confirmation=no\n";
|
"confirmation=no\n",
|
||||||
|
"dateformat=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'range.rc', 'Created range.rc');
|
ok (-r 'range.rc', 'Created range.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,8 @@ if (open my $fh, '>', 'color.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n",
|
print $fh "data.location=.\n",
|
||||||
"color.due=red\n",
|
"color.due=red\n",
|
||||||
"_forcecolor=1\n";
|
"_forcecolor=1\n",
|
||||||
|
"dateformat=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'color.rc', 'Created color.rc');
|
ok (-r 'color.rc', 'Created color.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,8 @@ if (open my $fh, '>', 'color.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n",
|
print $fh "data.location=.\n",
|
||||||
"color.due.today=red\n",
|
"color.due.today=red\n",
|
||||||
"_forcecolor=1\n";
|
"_forcecolor=1\n",
|
||||||
|
"dateformat=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'color.rc', 'Created color.rc');
|
ok (-r 'color.rc', 'Created color.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,8 @@ if (open my $fh, '>', 'color.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n",
|
print $fh "data.location=.\n",
|
||||||
"color.overdue=red\n",
|
"color.overdue=red\n",
|
||||||
"_forcecolor=1\n";
|
"_forcecolor=1\n",
|
||||||
|
"dateformat=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'color.rc', 'Created color.rc');
|
ok (-r 'color.rc', 'Created color.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ use Test::More tests => 4;
|
||||||
if (open my $fh, '>', 'iso.rc')
|
if (open my $fh, '>', 'iso.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n",
|
print $fh "data.location=.\n",
|
||||||
"dateformat=m/d/Y\n";
|
"dateformat.info=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'iso.rc', 'Created iso.rc');
|
ok (-r 'iso.rc', 'Created iso.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,8 @@ if (open my $fh, '>', 'default.rc')
|
||||||
"default.command=list\n",
|
"default.command=list\n",
|
||||||
"default.project=PROJECT\n",
|
"default.project=PROJECT\n",
|
||||||
"default.priority=M\n",
|
"default.priority=M\n",
|
||||||
"default.due=eom\n";
|
"default.due=eom\n",
|
||||||
|
"dateformat=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'default.rc', 'Created default.rc');
|
ok (-r 'default.rc', 'Created default.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,8 @@ if (open my $fh, '>', 'denotate.rc')
|
||||||
"confirmation=off\n",
|
"confirmation=off\n",
|
||||||
"report.rrr.description=rrr\n",
|
"report.rrr.description=rrr\n",
|
||||||
"report.rrr.columns=id,description\n",
|
"report.rrr.columns=id,description\n",
|
||||||
"report.rrr.sort=id+\n";
|
"report.rrr.sort=id+\n",
|
||||||
|
"dateformat=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'denotate.rc', 'Created denotate.rc');
|
ok (-r 'denotate.rc', 'Created denotate.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,8 @@ use Test::More tests => 13;
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'import.rc')
|
if (open my $fh, '>', 'import.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n";
|
print $fh "data.location=.\n",
|
||||||
|
"dateformat=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'import.rc', 'Created import.rc');
|
ok (-r 'import.rc', 'Created import.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,8 @@ use Test::More tests => 16;
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'import.rc')
|
if (open my $fh, '>', 'import.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n";
|
print $fh "data.location=.\n",
|
||||||
|
"dateformat=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'import.rc', 'Created import.rc');
|
ok (-r 'import.rc', 'Created import.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,8 @@ if (open my $fh, '>', 'roundtrip.rc')
|
||||||
print $fh "data.location=.\n",
|
print $fh "data.location=.\n",
|
||||||
"verbose=off\n",
|
"verbose=off\n",
|
||||||
"confirmation=no\n",
|
"confirmation=no\n",
|
||||||
"defaultwidth=100\n";
|
"defaultwidth=100\n",
|
||||||
|
"dateformat=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'roundtrip.rc', 'Created roundtrip.rc');
|
ok (-r 'roundtrip.rc', 'Created roundtrip.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,8 @@ use Test::More tests => 26;
|
||||||
if (open my $fh, '>', 'seq.rc')
|
if (open my $fh, '>', 'seq.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n",
|
print $fh "data.location=.\n",
|
||||||
"confirmation=off\n";
|
"confirmation=off\n",
|
||||||
|
"dateformat.annotation=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'seq.rc', 'Created seq.rc');
|
ok (-r 'seq.rc', 'Created seq.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,8 @@ if (open my $fh, '>', 'uda.rc')
|
||||||
"report.uda.description=UDA Test\n",
|
"report.uda.description=UDA Test\n",
|
||||||
"report.uda.columns=id,extra,description\n",
|
"report.uda.columns=id,extra,description\n",
|
||||||
"report.uda.sort=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;
|
close $fh;
|
||||||
ok (-r 'uda.rc', 'Created uda.rc');
|
ok (-r 'uda.rc', 'Created uda.rc');
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,8 @@ use Test::More tests => 26;
|
||||||
# Create the rc file.
|
# Create the rc file.
|
||||||
if (open my $fh, '>', 'uuid.rc')
|
if (open my $fh, '>', 'uuid.rc')
|
||||||
{
|
{
|
||||||
print $fh "data.location=.\n";
|
print $fh "data.location=.\n",
|
||||||
|
"dateformat=m/d/Y\n";
|
||||||
close $fh;
|
close $fh;
|
||||||
ok (-r 'uuid.rc', 'Created uuid.rc');
|
ok (-r 'uuid.rc', 'Created uuid.rc');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue