One could also let the user specify which date format they are using. It may even have field escapes to build a format like the date(1) command. Yet another option is to allow for year, month, and day arguments (-fromday -frommonth -fromyear -tomonth -today -toyear). One could also document ISO 8601 dates are taken by the program and reject anything that isn't one. There might be a Unix epoch timestamp option.
I find it odd that you would call using '-' as a separator an error. ISO 8601 demands it. The standard also works with week numbers and day-of-year numbers which can be quite handy sometimes. When writing new software which doesn't have to deal with legacy formats, I generally try to use a standard. If you're going to force a particular format, don't use one that encourages localization nightmares.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|