riesa-efau-kalender: fix date
This commit is contained in:
parent
18e40b3f3b
commit
f3ae7499d6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue