summaryrefslogtreecommitdiff
path: root/plugins/managesieve/tests/src/parser_date
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/managesieve/tests/src/parser_date')
-rw-r--r--plugins/managesieve/tests/src/parser_date21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/managesieve/tests/src/parser_date b/plugins/managesieve/tests/src/parser_date
new file mode 100644
index 000000000..06b00333f
--- /dev/null
+++ b/plugins/managesieve/tests/src/parser_date
@@ -0,0 +1,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;
+}