-
Notifications
You must be signed in to change notification settings - Fork 483
Closed
Description
code:
class Options
{
[Option("startDate", Required = true, HelpText = "The start of the date range. yyyy-mm-dd")]
public DateTime StartDate { get; set; }
[Option("endDate", Required = true, HelpText = "The end of the date range. yyyy-mm-dd")]
public DateTime EndDate { get; set; }
[Usage(ApplicationAlias = "myExe")]
public static IEnumerable<Example> Examples
{
get
{
var dateA = DateTime.Now.AddDays(-7);
var dateB = DateTime.Now;
yield return new Example("Normal scenario", new Options { StartDate = dateA, EndDate = dateB });
}
}
}command line:
Normal scenario:
myExe --endDate 3/20/2018 11:46:56 AM --startDate 3/13/2018 11:46:56 AM
desired:
myExe --endDate 2018-03-20 --startDate 2018-03-18
Metadata
Metadata
Assignees
Labels
No labels