Skip to content

CommandLine.Parser.Default.FormatCommandLine incorrectly shows DateTime/DateTime? option #502

@nknoop

Description

@nknoop

When you call the FormatCommandLine DateTime and DateTime? are not formatted correctly (if you feed the generated string back to the CommandLine it shows an error)

internal class Options
{
	[Option(
		longName: "start",
		Default = null,
		HelpText = "Some help text"
	)]
	public DateTime? Start { get; set; }
}

Formatted date looks something like this for me: 14/08/2019 09:51:12

There seem to be missing " quotations around it (or a T between the date and the time) also the formatting of the date is wrong, should be 2019-08-14

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions