We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0bcdaab commit c3336d8Copy full SHA for c3336d8
1 file changed
src/IGLib.Core/Console/Validation/Implementations/StringParsing/Parsers.cs
@@ -75,4 +75,23 @@ public bool TryParse(string text, out double value) =>
75
}
76
77
78
+
79
+ internal sealed class DateTimeStringParser : IStringParser<DateTime>
80
+ {
81
+ private readonly IFormatProvider _formatProvider;
82
83
+ public DateTimeStringParser(IFormatProvider formatProvider)
84
85
+ _formatProvider = formatProvider;
86
+ }
87
88
+ public bool TryParse(string text, out DateTime value) =>
89
+ DateTime.TryParse(
90
+ text,
91
+ _formatProvider,
92
+ DateTimeStyles.None,
93
+ out value);
94
95
96
97
0 commit comments