mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-01 18:27:20 +02:00
Config - defaults
- Implemented replacement Config::get* methods. - Replaced all calls throughout the code, with the new methods which have no static values as defaults.
This commit is contained in:
parent
0faf7fa8ee
commit
cb821c2a25
16 changed files with 234 additions and 265 deletions
|
@ -331,7 +331,7 @@ bool Att::validNameValue (
|
|||
{
|
||||
// Validate and convert to epoch.
|
||||
if (value != "")
|
||||
value = Date (value, context.config.get ("dateformat", "m/d/Y")).toEpochString ();
|
||||
value = Date (value, context.config.get ("dateformat")).toEpochString ();
|
||||
}
|
||||
|
||||
else if (name == "recur")
|
||||
|
@ -571,7 +571,7 @@ bool Att::match (const Att& other) const
|
|||
}
|
||||
else if (which == "date")
|
||||
{
|
||||
Date literal (mValue.c_str (), context.config.get ("dateformat", "m/d/Y"));
|
||||
Date literal (mValue.c_str (), context.config.get ("dateformat"));
|
||||
Date variable ((time_t)atoi (other.mValue.c_str ()));
|
||||
if (other.mValue == "" || ! (variable < literal))
|
||||
return false;
|
||||
|
@ -601,7 +601,7 @@ bool Att::match (const Att& other) const
|
|||
}
|
||||
else if (which == "date")
|
||||
{
|
||||
Date literal (mValue.c_str (), context.config.get ("dateformat", "m/d/Y"));
|
||||
Date literal (mValue.c_str (), context.config.get ("dateformat"));
|
||||
Date variable ((time_t)atoi (other.mValue.c_str ()));
|
||||
if (! (variable > literal))
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue