aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Data
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-06-16 16:25:07 +0100
committerM Somerville <matthew-github@dracos.co.uk>2020-11-11 10:29:20 +0000
commitc0f9b0dcb1fc7cecb4b98ad82715600f73707bf0 (patch)
tree52631c2abc794598fc1b99bc436b7647f103a14a /perllib/Data
parent613f45c6514ace275b3a49a5d50f7b83ed536b5f (diff)
[Waste] ICal generation, with Data::ICal.
Diffstat (limited to 'perllib/Data')
-rw-r--r--perllib/Data/ICal/Entry/Event7986.pm18
-rw-r--r--perllib/Data/ICal/RFC7986.pm17
2 files changed, 35 insertions, 0 deletions
diff --git a/perllib/Data/ICal/Entry/Event7986.pm b/perllib/Data/ICal/Entry/Event7986.pm
new file mode 100644
index 000000000..ae627861a
--- /dev/null
+++ b/perllib/Data/ICal/Entry/Event7986.pm
@@ -0,0 +1,18 @@
+package Data::ICal::Entry::Event7986;
+
+use parent 'Data::ICal::Entry::Event';
+
+sub optional_unique_properties {
+ return (
+ shift->SUPER::optional_unique_properties,
+ "color",
+ );
+}
+
+sub optional_repeatable_properties {
+ return (
+ shift->SUPER::optional_repeatable_properties,
+ "conference", "image",
+ );
+}
+
diff --git a/perllib/Data/ICal/RFC7986.pm b/perllib/Data/ICal/RFC7986.pm
new file mode 100644
index 000000000..01f9d354e
--- /dev/null
+++ b/perllib/Data/ICal/RFC7986.pm
@@ -0,0 +1,17 @@
+package Data::ICal::RFC7986;
+
+use parent 'Data::ICal';
+
+sub optional_unique_properties {
+ qw( calscale method
+ uid last-modified url refresh-interval source color
+ );
+}
+
+# name/description are only repeatable to provide
+# translations with language param
+sub optional_repeatable_properties {
+ qw( name description categories image );
+}
+
+1;