#! /usr/bin/env ruby

# daylight.rb: Written by Tadayoshi Funaba 1998-2002
# $Id: daylight.rb,v 2.4 2002-06-08 00:40:29+09 tadf Exp $

require 'date'
require 'date/holiday'

year = Date.today.year
[[ 4,  1, 0, 'US Daylight Saving Time begins'], # first Sunday in April
 [10, -1, 0, 'US Daylight Saving Time ends']].  # last Sunday in October
each do |mon, n, k, event|
  puts(Date.nth_kday(n, k, year, mon).to_s + '  ' + event)
end
