As per [#8] we do have some issues when dealing with date/times passed in. However, assuming those will get fixed (soon!), here are the parameters expected to be followed by a date/time in the command line:
-bd
or --before-date
= specifies a date/time to filter versions older than the specified dateThis is based on the envisaged common usage scenarios of the tool, which as far as I can tell (based on my own experience) comprise of:
Based on the above, we will be supporting the following 3 formats see SimpleDateFormat:
yyyy-MM-dd HH:mm:ss
yyyy-MM-dd HH:mm
yyyy-MM-dd
If any other date/time format is specified in the command line the program will bail out with an error message indicating wrong date format.
The code simply tries each format one by one, in the order specified above (starting with 1, then 2, etc.). If at any point it manages to parse successfully the date/time string using one of the formats above into a valid date it assumes that the date/time has been specified in the current format and stops returning the parse date.
In other words, it tries to parse first the string using the full date + time format specified at 1. If this returns a valid date and doesn't raise an error, it returns that and doesn't try any of the other formats. If however, this fails, it proceeds to trying format number 2. Again, if this renders a valid date and no errors it simply returns the parsed date and doesn't continue with 3; if however this fails, it then tries to use 3rd format, and so on.