summaryrefslogtreecommitdiff
path: root/plugins/managesieve/tests/src/parser_date
blob: 06b00333fa439f8232b9913e9d17342ef8e6c233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require ["comparator-i;ascii-numeric","date","fileinto","relational"];
# rule:[date]
if allof (date :originalzone :value "ge" :comparator "i;ascii-numeric" "date" "hour" "09")
{
	fileinto "urgent";
}
# rule:[date-weekday]
if date :is "received" "weekday" "0"
{
	fileinto "weekend";
}
# rule:[date-zone]
if date :zone "-0500" :value "gt" :comparator "i;ascii-numeric" "received" "iso8601" "2007-02-26T09:00:00-05:00"
{
	stop;
}
# rule:[currentdate]
if anyof (currentdate :is "weekday" "0", currentdate :value "lt" :comparator "i;ascii-numeric" "hour" "09", currentdate :value "ge" :comparator "i;ascii-numeric" "date" "2007-06-30")
{
	stop;
}