Method: Watchmob::AukroPage#deadline
- Defined in:
- lib/watchmob/aukro_page.rb
#deadline ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/watchmob/aukro_page.rb', line 17 def deadline document.at_css(".timeInfo").inner_text.match( /\(([[:alpha:]]+),\s+(\d+)\s+([[:alpha:]]+),\s+(\d+):(\d+):(\d+)/ ) do |md| text, weekday_name, month_day, month_name, hours, minutes, seconds = *md.to_a DateTime.new( Time.now.year, month_name_to_number(month_name), month_day.to_i, hours.to_i, minutes.to_i, seconds.to_i, '+1' ) end end |