summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2013-05-17 20:27:32 +0100
committerdakkar <dakkar@thenautilus.net>2013-05-17 20:27:32 +0100
commitae0b3100bf8f11e23cf60132a7467f7aff2950dc (patch)
tree583a0021990d2fd5bbd5b42334b12ac6ee9fbe4e /lib
parentexample data file (diff)
downloadHomePanel-ae0b3100bf8f11e23cf60132a7467f7aff2950dc.tar.gz
HomePanel-ae0b3100bf8f11e23cf60132a7467f7aff2950dc.tar.bz2
HomePanel-ae0b3100bf8f11e23cf60132a7467f7aff2950dc.zip
DateTime fields
Diffstat (limited to 'lib')
-rw-r--r--lib/WebService/ForecastIo/Alert.pm4
-rw-r--r--lib/WebService/ForecastIo/DataPoint.pm4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/WebService/ForecastIo/Alert.pm b/lib/WebService/ForecastIo/Alert.pm
index 37ff4ac..d402fa2 100644
--- a/lib/WebService/ForecastIo/Alert.pm
+++ b/lib/WebService/ForecastIo/Alert.pm
@@ -2,6 +2,7 @@ package WebService::ForecastIo::Alert;
use Moose;
use Moose::Util::TypeConstraints;
use MooseX::Types::URI 'Uri';
+use MooseX::Types::DateTime;
class_type 'WebService::ForecastIo::Alert';
@@ -25,7 +26,8 @@ has title => (
has expires => (
is => 'ro',
- isa => 'Int', # time!
+ isa => 'DateTime',
+ coerce => 1,
);
has uri => (
diff --git a/lib/WebService/ForecastIo/DataPoint.pm b/lib/WebService/ForecastIo/DataPoint.pm
index c05e981..ba06fa1 100644
--- a/lib/WebService/ForecastIo/DataPoint.pm
+++ b/lib/WebService/ForecastIo/DataPoint.pm
@@ -1,6 +1,7 @@
package WebService::ForecastIo::DataPoint;
use Moose;
use Moose::Util::TypeConstraints;
+use MooseX::Types::DateTime;
class_type 'WebService::ForecastIo::DataPoint';
@@ -22,7 +23,8 @@ has [qw( time
precipIntensityMaxTime
temperatureMinTime temperatureMaxTime )] => (
is => 'ro',
- isa => 'Int', # time!
+ isa => 'DateTime',
+ coerce => 1,
);
has [qw(summary icon precipType)] => (