mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
add trigtz() function
This commit is contained in:
@@ -181,7 +181,7 @@
|
||||
"timezone" "today" "trig" "trigback" "trigbase" "trigcompletethrough" "trigdate" "trigdatetime"
|
||||
"trigdelta" "trigduration" "trigeventduration" "trigeventstart"
|
||||
"trigfrom" "trigger" "triginfo" "trigistodo" "trigmaxoverdue" "trigpriority" "trigrep"
|
||||
"trigscanfrom" "trigtags" "trigtime" "trigtimedelta" "trigtimerep"
|
||||
"trigscanfrom" "trigtags" "trigtime" "trigtimedelta" "trigtimerep" "trigtz"
|
||||
"triguntil" "trigvalid" "typeof" "tzconvert" "upper" "utctolocal"
|
||||
"value" "version" "weekno" "wkday" "wkdaynum" "year"
|
||||
)
|
||||
|
||||
@@ -4803,6 +4803,11 @@ command. Returns a positive integer N if the "repeat" is of the form
|
||||
Similar to \fBtrigrep()\fR, but returns the repeat used in the \fBAT\fR clause
|
||||
of a timed reminder.
|
||||
.TP
|
||||
.B trigtz()
|
||||
If a \fBTZ\fR clause was used in the last \fBREM\fR or \fBIFTRIG\fR
|
||||
command, returns the time zone name. Otherwise returns the empty
|
||||
string.
|
||||
.TP
|
||||
.B trigduration()
|
||||
Returns (as a TIME type) the \fBDURATION\fR parameter of a timed
|
||||
reminder. If there is no \fBDURATION\fR parameter, returns the
|
||||
|
||||
10
src/funcs.c
10
src/funcs.c
@@ -192,6 +192,7 @@ static int FTrigtags (func_info *);
|
||||
static int FTrigtime (func_info *);
|
||||
static int FTrigtimedelta (func_info *);
|
||||
static int FTrigtimerep (func_info *);
|
||||
static int FTrigtz (func_info *);
|
||||
static int FTriguntil (func_info *);
|
||||
static int FTrigvalid (func_info *);
|
||||
static int FTypeof (func_info *);
|
||||
@@ -368,6 +369,7 @@ BuiltinFunc Func[] = {
|
||||
{ "trigtime", 0, 0, 0, FTrigtime, NULL },
|
||||
{ "trigtimedelta",0, 0, 0, FTrigtimedelta, NULL },
|
||||
{ "trigtimerep", 0, 0, 0, FTrigtimerep, NULL },
|
||||
{ "trigtz", 0, 0, 0, FTrigtz, NULL },
|
||||
{ "triguntil", 0, 0, 0, FTriguntil, NULL },
|
||||
{ "trigvalid", 0, 0, 0, FTrigvalid, NULL },
|
||||
{ "typeof", 1, 1, 1, FTypeof, NULL },
|
||||
@@ -1955,6 +1957,14 @@ static int FTrigtimerep(func_info *info)
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int FTrigtz(func_info *info)
|
||||
{
|
||||
if (!LastTrigger.tz) {
|
||||
return RetStrVal("", info);
|
||||
}
|
||||
return RetStrVal(LastTrigger.tz, info);
|
||||
}
|
||||
|
||||
static int FTrigeventduration(func_info *info)
|
||||
{
|
||||
if (LastTrigger.eventduration == NO_TIME) {
|
||||
|
||||
@@ -24655,6 +24655,7 @@ trigtags
|
||||
trigtime
|
||||
trigtimedelta
|
||||
trigtimerep
|
||||
trigtz
|
||||
triguntil
|
||||
trigvalid
|
||||
typeof
|
||||
|
||||
Reference in New Issue
Block a user