summaryrefslogtreecommitdiff
path: root/lib/Types/DateTime.pm
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2023-12-09 13:10:17 +0000
committerdakkar <dakkar@thenautilus.net>2023-12-09 13:10:17 +0000
commit8bd30555a18dcab02dc95ea8b3701cdc7adbabb6 (patch)
tree4a2351d6111c8231fb04db72391ea2da5d60dbf3 /lib/Types/DateTime.pm
parentwe can use the new weather api (diff)
downloadHomePanel-8bd30555a18dcab02dc95ea8b3701cdc7adbabb6.tar.gz
HomePanel-8bd30555a18dcab02dc95ea8b3701cdc7adbabb6.tar.bz2
HomePanel-8bd30555a18dcab02dc95ea8b3701cdc7adbabb6.zip
new bus api
Diffstat (limited to 'lib/Types/DateTime.pm')
-rw-r--r--lib/Types/DateTime.pm20
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/Types/DateTime.pm b/lib/Types/DateTime.pm
deleted file mode 100644
index d13f0d5..0000000
--- a/lib/Types/DateTime.pm
+++ /dev/null
@@ -1,20 +0,0 @@
-package Types::DateTime;
-use strict;
-use warnings;
-use namespace::autoclean;
-use Type::Library -base, -declare => 'DateTimeT';
-use Type::Utils -all;
-use Types::Standard -types;
-
-class_type DateTimeT, { class => 'DateTime' };
-coerce DateTimeT, from Num, via {
- require DateTime;
- DateTime->from_epoch(epoch => $_ );
-};
-coerce DateTimeT, from Str, via {
- require DateTime::Format::ISO8601;
- s{([+-])(\d\d)(\d\d)\z}{$1$2:$3};
- DateTime::Format::ISO8601->new->parse_datetime($_)
-};
-
-1;