Manila viewNewsItems goodness

I started playing around with a Manila macro that I had had filed away on my to do list for a while, the viewNewsItems macro. It’s a pretty powerful macro, allowing you to take your content and slice and dice it chronologically and by news department (aka category), as well as changing the presentation.

The only problem was I couldn’t figure out how to get the date parameter limits working. Every date string I passed in seemed to be ignored. I finally realized that I needed to let Manila figure out the appropriate date format for itself. So instead of trying to figure out the appropriate date string format, I used the date verb instead:

{viewNewsItems (n:100, department:"Music", maxDate:date("12/31/2001"), minDate:date("1/1/2001"))}

It seems like every programming language I run into has the same issue about how to deal with date formats. Here the safest thing to do seems to be to use the programming environment’s typing capabilities rather than figure out how to format the string properly.