commandlineparser / commandlineparser/commandline

Support for specifying valid date/time formats

未关闭
#706 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C#
星标
4.8k
派生
478
PR 合并指标
30 天内没有已合并 PR

描述

It would be really helpful if there was a way to provide the **valid, accepted** date/time formats for parameter of type `DateTime`. Right now, some formats work - others don't - and I don't see much support for specifying which ones I'd like to accept - meaning in the end I need to use `string` as datatype and do the parsing myself (suboptimal).....

Any hope a feature like that might be added sooner or later? For a parameter of type `DateTime`, allow a `DateTimeFormat` attribute or some other way of specifying the accepted, valid date format strings.

Thanks!

贡献指南

这个仓库没有索引到贡献指南

调研方向

该 issue 未指定文件、测试或入口点。首先定位 DateTime 命令行参数的解析方式,然后确定 DateTimeFormat 属性或等效机制应如何指定接受的格式,以及验证应如何执行;当调用方能够提供格式而无需回退到字符串解析时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp
领域
cli
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。