riesa-efau-kalender: fix date

This commit is contained in:
Astro 2021-07-18 02:42:37 +02:00
parent 18e40b3f3b
commit f3ae7499d6
1 changed files with 2 additions and 2 deletions

View File

@ -20,13 +20,13 @@ class Event
attr_reader :date
def date=(s)
if s =~ /(\d{1,2})\. (.+?) (\d{4}), (\d\d:\d\d) Uhr/
if s =~ /(\d{1,2})\. (.+?) (\d{4}), (\d\d):(\d\d) Uhr/
year = $3.to_i
month = MONTHS.index($2) + 1
day = $1.to_i
hour = $4.to_i
minute = $5.to_i
@date = Time::local year, month, date, hour, minute, 0
@date = Time::local year, month, day, hour, minute, 0
else
raise "Invalid date: #{s.inspect}"
end