On my military reading list site I wanted to be able to find records created in a particular month. That let me do URLs like /revisions/navy/jan-2009
and then look up the proper revision - e.g., the 2009 revision of the Navy reading list.
So, here are the functions, the first of which I got from some place on the internet which now eludes my Googling:
And here's how to use them to look up revisions created in Januaary 2009:
The coolest thing about this is that conditions
takes a Range
object, so it's easy to look up things within a date range. It gets translated to a SQL BETWEEN
clause... very handy!