Originally posted by Keith Sebastian:
I had previously written some javascript that used the subtract technique, but I like the 0 way. Thanks.
Maybe I'm the only one who finds this funny, but after I wrote it, I realized that subtracting until getting to the previous month is the same as just setting the date to 0. In fact looping/subtracting is a waste of processing. It's amusing how such obvious things could be overlooked.