#!/usr/bin/ruby yprev = nil for year in 1900..2200 t = Time.gm(year, 11, 4, 0, 0, 0) next unless 'Sat' == t.strftime('%a') ydif = year - yprev.to_i printf("%4u %2u\n", year, ydif) if yprev yprev = year end