|
Abbey Workshop |
||||||||||
While working today I ran across this page with some nice simple Ruby date examples. I'm working on a project where an XQuery needs to pull its data based on yesterday's date. The XPath spec has functions for this sort of date math, but my native XML database vendor does not currently support the functions I need. So when I googled for how to subract a day with Ruby this is what I came up with:
Ruby rocks. Simple and easy, just what you would expect.
Copyright © Abbey Workshop 2006