I'd like to write a function that behaves one way when the argument is a Mathematica date, such as {2013,12,15}
, or with added hours, minutes and seconds if necessary. And the function needs to do something different with strings that will look like
2013 Month 02
I see that I can specify List, as in f[x_List]
and f[x_String]
that will do what I want as long as I don't mess up the arguments. Is there way to be more specific about the patterns that are allowed?