Permalink
Browse files

metar: fix for timestamps like "2124" meaning "2200".

  • Loading branch information...
mrjbq7 committed Nov 20, 2018
1 parent 9804c3c commit d82ce045ea74e6221077da5d94efe6bacc0964e0
Showing with 5 additions and 1 deletion.
  1. +5 −1 extra/metar/metar.factor
@@ -141,7 +141,11 @@ MEMO: glossary ( -- assoc )
: parse-timestamp ( str -- str' )
[ now [ year>> ] [ month>> ] bi ] dip
2 cut 2 cut 2 cut drop [ string>number ] tri@
0 instant <timestamp> timestamp>rfc822 ;
over 24 = [
[ drop 0 ] dip 0 instant <timestamp> 1 days time+
] [
0 instant <timestamp>
] if timestamp>rfc822 ;

CONSTANT: compass-directions H{
{ 0.0 "N" }

0 comments on commit d82ce04

Please sign in to comment.