Make $T behave as documented: If trigger date is not valid, should return 0.

This commit is contained in:
Dianne Skoll
2022-07-04 14:23:39 -04:00
parent 4824b07ec8
commit 6dcb25073b
2 changed files with 3 additions and 2 deletions

View File

@@ -170,10 +170,11 @@ static int latitude_func(int do_set, Value *val)
static int trig_date_func(int do_set, Value *val)
{
UNUSED(do_set);
val->type = DATE_TYPE;
if (!LastTrigValid) {
val->type = INT_TYPE;
val->v.val = 0;
} else {
val->type = DATE_TYPE;
val->v.val = LastTriggerDate;
}
return OK;

View File

@@ -2766,7 +2766,7 @@ Variable Value
$SubsIndent 0 [0, 132]
$Sunday "Sunday"
$SuppressLRM 0 [0, 1]
$T 1990-01-01
$T 0
$Td -1
$Thursday "Thursday"
$TimeSep ":"