Skip to content

Instantly share code, notes, and snippets.

@numinit
Created August 26, 2012 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save numinit/3481274 to your computer and use it in GitHub Desktop.
Save numinit/3481274 to your computer and use it in GitHub Desktop.
puts (Class.new(Time) {|c| c.send(:define_method, :to_s) {"#{%w(Sun Morn Tir Mid Tur Fre Lore)[wday]}das, #{mday}#{%w(st nd rd th)[(mday >= 11 && mday <= 13 || (a = (mday - (mday.to_f / 10.0).floor * 10) - 1) > 3 ? 3 : a)]} of #{['Morning Star', 'Sun\'s Dawn', 'First Seed', 'Rain\'s Hand', 'Second Seed', 'Midyear', 'Sun\'s Height', 'Last Seed', 'Hearthfire', 'Frostfall', 'Sun\'s Dusk', 'Evening Star'][month - 1]}, 4E #{year - 1810}"}}).now.to_s
@CASandmann
Copy link

what do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment