diff --git a/src/var.c b/src/var.c index 78bec6e4..bcd24d8b 100644 --- a/src/var.c +++ b/src/var.c @@ -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; diff --git a/tests/test.cmp b/tests/test.cmp index ee472bea..bb14e395 100644 --- a/tests/test.cmp +++ b/tests/test.cmp @@ -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 ":"