Main Content

How many days to Christmas?

Archive - Originally posted on "The Horse's Mouth" - 2011-09-09 19:16:37 - Graham Ellis

It's only 107 days to Christmas ... courses for next year have already been scheduled [here], the days are drawing in quite quickly, and a Ruby program I wrote to show hoe the Time class works told me. Source code [here].

What's lovely about Ruby is that it has the flexibility of Perl, and the togetherness of structure of Python. And I just love being able to dop a minus sign between two time objects and come up with a result which is the difference. An eloquent demonstration of a good use of operator override!

Image - from Ljublijana, Slovenia - where I gave a Python course a couple of years ago.