Permalink
Browse files

Support for "Mon 25:00" notation

  • Loading branch information...
ongaeshi committed Aug 14, 2017
1 parent 3442542 commit 597c2fb79cc08ba9bddbe0e0a2dc378d44b96a20
Showing with 8 additions and 2 deletions.
  1. +8 −2 radiko.rb
View
@@ -69,11 +69,17 @@ def parse_whm(src)
week = %w(sun mon tue wed thu fri sat)
# weekday
r << week.index(w.downcase)
wi = week.index(w.downcase)
# hour
hour, min = t.split(":")
r << hour.to_i
hour = hour.to_i
if hour >= 24
hour -= 24
wi = wi == 6 ? 0 : wi + 1
end
r << wi
r << hour
# min
r << min.to_i

0 comments on commit 597c2fb

Please sign in to comment.