summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-02-14 22:16:42 +0100
committerDaniel Friesel <derf@finalrewind.org>2015-02-14 22:16:42 +0100
commitd212b3f39be996ce6093b7a5389abea4c5c220f4 (patch)
tree1fd66fbf7fa9c0bab702eebf913ae397c11c915b /lib/Travel/Status/DE
parent8a22c2580149cf44309b11ad8c8faf22956dce4a (diff)
Result: Add raw_messages accessor (undocumented for now)
Diffstat (limited to 'lib/Travel/Status/DE')
-rw-r--r--lib/Travel/Status/DE/IRIS/Result.pm20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/IRIS/Result.pm b/lib/Travel/Status/DE/IRIS/Result.pm
index 9296dc2..8b5c781 100644
--- a/lib/Travel/Status/DE/IRIS/Result.pm
+++ b/lib/Travel/Status/DE/IRIS/Result.pm
@@ -389,6 +389,26 @@ sub qos_messages {
return @ret;
}
+sub raw_messages {
+ my ($self) = @_;
+
+ my $strp = DateTime::Format::Strptime->new(
+ pattern => '%y%m%d%H%M',
+ time_zone => 'Europe/Berlin',
+ );
+
+ my @messages = reverse sort keys %{ $self->{messages} };
+ my @ret = map {
+ [
+ $strp->parse_datetime( $self->{messages}->{$_}->[0] ),
+ $self->{messages}->{$_}->[2]
+ ]
+ } @messages;
+
+ return @ret;
+}
+
+
sub messages {
my ($self) = @_;