title: Is there a way to convert a variable that can be either a datetime or a date to a date?
body: <p>I have a function that can accept a date or a datetime as one of its arguments.  If the value is a datetime, I would like to convert it to its <code>date</code> components.  What is the pythonic way of doing that?</p>