diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Travel/Status/DE/IRIS/Result.pm | 20 |
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) = @_; |