rspec/rules/S6580/why-dotnet.adoc

18 lines
590 B
Plaintext

== Why is this an issue?
If you try to parse a string representation of a date or time without a format provider, the method will use the machine's `CultureInfo`; if the given string does not follow it, you'll have an object that does not match the string representation or an unexpected runtime error.
This rule raises an issue for the following date and time string representation parsing methods:
* `Parse`
* `ParseExact`
* `TryParse`
* `TryParseExact`
Of the following types:
* `System.DateOnly`
* `System.DateTime`
* `System.DateTimeOffset`
* `System.TimeOnly`
* `System.TimeSpan`