2 instantiations of DateTimeFormatInfo
Microsoft.VisualBasic.Core (1)
System.Private.CoreLib (1)
281 references to DateTimeFormatInfo
Aspire.Dashboard (3)
AuthSamples.FunctionalTests (4)
CustomPolicyProviderTests.cs (4)
51var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 20)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture));
67var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 5)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture));
82var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 55)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture));
98var signIn = await SignIn(Client, "Dude", DateTime.Now.Subtract(TimeSpan.FromDays(365 * 20)).ToString(DateTimeFormatInfo.InvariantInfo.ShortDatePattern, CultureInfo.InvariantCulture));
dotnet-svcutil-lib (8)
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (6)
841return value.ToString(format, DateTimeFormatInfo.InvariantInfo);
881return value.ToString(format, DateTimeFormatInfo.InvariantInfo);
1382return DateTime.ParseExact(s, format, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite);
1391return DateTime.ParseExact(s, formats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite);
1443return DateTimeOffset.ParseExact(s, format, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite);
1452return DateTimeOffset.ParseExact(s, formats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite);
Microsoft.AspNetCore.Http (2)
Microsoft.AspNetCore.Mvc.Core (2)
Microsoft.AspNetCore.Routing (2)
Microsoft.CodeAnalysis.CodeStyle (1)
Microsoft.CodeAnalysis.Features (1)
Microsoft.Net.Http.Headers (2)
Microsoft.VisualBasic.Core (6)
mscorlib (1)
netstandard (1)
PresentationFramework (12)
ReachFramework (1)
System.ComponentModel.TypeConverter (18)
System.Data.Common (3)
System.Globalization (1)
System.Net.Http (2)
System.Net.Requests (2)
System.Private.CoreLib (184)
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (31)
1582return DateTimeParse.Parse(s, DateTimeFormatInfo.CurrentInfo, DateTimeStyles.None);
1592return DateTimeParse.Parse(s, DateTimeFormatInfo.GetInstance(provider), DateTimeStyles.None);
1597DateTimeFormatInfo.ValidateStyles(styles, styles: true);
1599return DateTimeParse.Parse(s, DateTimeFormatInfo.GetInstance(provider), styles);
1604DateTimeFormatInfo.ValidateStyles(styles, styles: true);
1605return DateTimeParse.Parse(s, DateTimeFormatInfo.GetInstance(provider), styles);
1616return DateTimeParse.ParseExact(s, format, DateTimeFormatInfo.GetInstance(provider), DateTimeStyles.None);
1625DateTimeFormatInfo.ValidateStyles(style);
1628return DateTimeParse.ParseExact(s, format, DateTimeFormatInfo.GetInstance(provider), style);
1633DateTimeFormatInfo.ValidateStyles(style);
1634return DateTimeParse.ParseExact(s, format, DateTimeFormatInfo.GetInstance(provider), style);
1639DateTimeFormatInfo.ValidateStyles(style);
1641return DateTimeParse.ParseExactMultiple(s, formats, DateTimeFormatInfo.GetInstance(provider), style);
1646DateTimeFormatInfo.ValidateStyles(style);
1647return DateTimeParse.ParseExactMultiple(s, formats, DateTimeFormatInfo.GetInstance(provider), style);
1790return DateTimeParse.TryParse(s, DateTimeFormatInfo.CurrentInfo, DateTimeStyles.None, out result);
1795return DateTimeParse.TryParse(s, DateTimeFormatInfo.CurrentInfo, DateTimeStyles.None, out result);
1800DateTimeFormatInfo.ValidateStyles(styles, styles: true);
1808return DateTimeParse.TryParse(s, DateTimeFormatInfo.GetInstance(provider), styles, out result);
1813DateTimeFormatInfo.ValidateStyles(styles, styles: true);
1814return DateTimeParse.TryParse(s, DateTimeFormatInfo.GetInstance(provider), styles, out result);
1819DateTimeFormatInfo.ValidateStyles(style);
1827return DateTimeParse.TryParseExact(s, format, DateTimeFormatInfo.GetInstance(provider), style, out result);
1832DateTimeFormatInfo.ValidateStyles(style);
1833return DateTimeParse.TryParseExact(s, format, DateTimeFormatInfo.GetInstance(provider), style, out result);
1838DateTimeFormatInfo.ValidateStyles(style);
1846return DateTimeParse.TryParseExactMultiple(s, formats, DateTimeFormatInfo.GetInstance(provider), style, out result);
1851DateTimeFormatInfo.ValidateStyles(style);
1852return DateTimeParse.TryParseExactMultiple(s, formats, DateTimeFormatInfo.GetInstance(provider), style, out result);
1934return DateTimeFormat.GetAllDateTimes(this, DateTimeFormatInfo.GetInstance(provider));
1950return DateTimeFormat.GetAllDateTimes(this, format, DateTimeFormatInfo.GetInstance(provider));
src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (17)
655DateTimeFormatInfo.CurrentInfo,
674DateTimeFormatInfo.GetInstance(formatProvider),
683DateTime dateResult = DateTimeParse.Parse(input, DateTimeFormatInfo.GetInstance(formatProvider), styles, out TimeSpan offset);
706DateTimeFormatInfo.GetInstance(formatProvider),
715DateTime dateResult = DateTimeParse.ParseExact(input, format, DateTimeFormatInfo.GetInstance(formatProvider), styles, out TimeSpan offset);
726DateTimeFormatInfo.GetInstance(formatProvider),
735DateTime dateResult = DateTimeParse.ParseExactMultiple(input, formats, DateTimeFormatInfo.GetInstance(formatProvider), styles, out TimeSpan offset);
816DateTimeFormatInfo.CurrentInfo,
826bool parsed = DateTimeParse.TryParse(input, DateTimeFormatInfo.CurrentInfo, DateTimeStyles.None, out DateTime dateResult, out TimeSpan offset);
841DateTimeFormatInfo.GetInstance(formatProvider),
852bool parsed = DateTimeParse.TryParse(input, DateTimeFormatInfo.GetInstance(formatProvider), styles, out DateTime dateResult, out TimeSpan offset);
869DateTimeFormatInfo.GetInstance(formatProvider),
881bool parsed = DateTimeParse.TryParseExact(input, format, DateTimeFormatInfo.GetInstance(formatProvider), styles, out DateTime dateResult, out TimeSpan offset);
898DateTimeFormatInfo.GetInstance(formatProvider),
910bool parsed = DateTimeParse.TryParseExactMultiple(input, formats, DateTimeFormatInfo.GetInstance(formatProvider), styles, out DateTime dateResult, out TimeSpan offset);
955if ((styles & (DateTimeFormatInfo.InvalidDateTimeStyles | DateTimeStyles.NoCurrentDateDefault)) != 0
967string message = (styles & DateTimeFormatInfo.InvalidDateTimeStyles) != 0 ? SR.Argument_InvalidDateTimeStyles
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (28)
143internal static readonly DateTimeFormatInfo InvariantFormatInfo = CultureInfo.InvariantCulture.DateTimeFormat;
207private static string FormatDayOfWeek(int dayOfWeek, int repeat, DateTimeFormatInfo dtfi)
219private static string FormatMonth(int month, int repeatCount, DateTimeFormatInfo dtfi)
260private static string FormatHebrewMonthName(DateTime time, int month, int repeatCount, DateTimeFormatInfo dtfi)
429DateTime dateTime, scoped ReadOnlySpan<char> format, DateTimeFormatInfo dtfi, TimeSpan offset, ref ValueListBuilder<TChar> result) where TChar : unmanaged, IUtfChar<TChar>
634AppendChar(ref result, DateTimeFormatInfo.JapaneseEraStart[0]);
896internal static string ExpandStandardFormatToCustomPattern(char format, DateTimeFormatInfo dtfi) =>
922DateTimeFormatInfo dtfi;
926dtfi = DateTimeFormatInfo.GetInstance(provider);
937else if (ReferenceEquals(dtfi, DateTimeFormatInfo.InvariantInfo))
954dtfi = DateTimeFormatInfo.InvariantInfo;
956else if (ReferenceEquals(dtfi, DateTimeFormatInfo.InvariantInfo))
1005dtfi = DateTimeFormatInfo.GetInstance(provider);
1012dtfi = DateTimeFormatInfo.GetInstance(provider);
1019dtfi = DateTimeFormatInfo.GetInstance(provider);
1036DateTimeFormatInfo dtfi;
1040dtfi = DateTimeFormatInfo.GetInstance(provider);
1048else if (ReferenceEquals(dtfi, DateTimeFormatInfo.InvariantInfo))
1062dtfi = DateTimeFormatInfo.InvariantInfo;
1064else if (ReferenceEquals(dtfi, DateTimeFormatInfo.InvariantInfo))
1096dtfi = DateTimeFormatInfo.GetInstance(provider);
1103dtfi = DateTimeFormatInfo.GetInstance(provider);
1110dtfi = DateTimeFormatInfo.GetInstance(provider);
1137private static bool IsTimeOnlySpecialCase(DateTime dateTime, DateTimeFormatInfo dtfi) =>
1158private static void PrepareFormatU(ref DateTime dateTime, ref DateTimeFormatInfo dtfi, TimeSpan offset)
1170dtfi = (DateTimeFormatInfo)dtfi.Clone();
1719internal static string[] GetAllDateTimes(DateTime dateTime, char format, DateTimeFormatInfo dtfi)
1773internal static string[] GetAllDateTimes(DateTime dateTime, DateTimeFormatInfo dtfi)
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (51)
20internal static DateTime ParseExact(ReadOnlySpan<char> s, ReadOnlySpan<char> format, DateTimeFormatInfo dtfi, DateTimeStyles style)
34internal static DateTime ParseExact(ReadOnlySpan<char> s, ReadOnlySpan<char> format, DateTimeFormatInfo dtfi, DateTimeStyles style, out TimeSpan offset)
50internal static bool TryParseExact(ReadOnlySpan<char> s, ReadOnlySpan<char> format, DateTimeFormatInfo dtfi, DateTimeStyles style, out DateTime result)
65internal static bool TryParseExact(ReadOnlySpan<char> s, ReadOnlySpan<char> format, DateTimeFormatInfo dtfi, DateTimeStyles style, out DateTime result, out TimeSpan offset)
83internal static bool TryParseExact(ReadOnlySpan<char> s, ReadOnlySpan<char> format, DateTimeFormatInfo dtfi, DateTimeStyles style, scoped ref DateTimeResult result)
103DateTimeFormatInfo dtfi, DateTimeStyles style)
118DateTimeFormatInfo dtfi, DateTimeStyles style, out TimeSpan offset)
135DateTimeFormatInfo dtfi, DateTimeStyles style, out DateTime result, out TimeSpan offset)
154DateTimeFormatInfo dtfi, DateTimeStyles style, out DateTime result)
170DateTimeFormatInfo dtfi, DateTimeStyles style, scoped ref DateTimeResult result)
605private static bool Lex(DS dps, ref __DTString str, scoped ref DateTimeToken dtok, scoped ref DateTimeRawInfo raw, scoped ref DateTimeResult result, scoped ref DateTimeFormatInfo dtfi, DateTimeStyles styles)
1060dtfi = DateTimeFormatInfo.GetJapaneseCalendarDTFI();
1081dtfi = DateTimeFormatInfo.GetTaiwanCalendarDTFI();
1551private static bool GetDayOfNN(ref DateTimeResult result, scoped ref DateTimeStyles styles, scoped ref DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
1593private static bool GetDayOfNNN(ref DateTimeResult result, scoped ref DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
1649private static bool GetDayOfMN(ref DateTimeResult result, scoped ref DateTimeStyles styles, scoped ref DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
1708private static bool GetHebrewDayOfNM(ref DateTimeResult result, scoped ref DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
1728private static bool GetDayOfNM(ref DateTimeResult result, scoped ref DateTimeStyles styles, scoped ref DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
1781private static bool GetDayOfMNN(ref DateTimeResult result, scoped ref DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
1850private static bool GetDayOfYNN(ref DateTimeResult result, scoped ref DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
1884private static bool GetDayOfNNY(ref DateTimeResult result, scoped ref DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
1976private static void AdjustTimeMark(DateTimeFormatInfo dtfi, scoped ref DateTimeRawInfo raw)
2121private static bool GetDateOfNNDS(ref DateTimeResult result, scoped ref DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
2234internal static bool ProcessHebrewTerminalState(DS dps, scoped ref DateTimeResult result, scoped ref DateTimeStyles styles, scoped ref DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
2344internal static bool ProcessTerminalState(DS dps, scoped ref DateTimeResult result, scoped ref DateTimeStyles styles, scoped ref DateTimeRawInfo raw, DateTimeFormatInfo dtfi)
2423internal static DateTime Parse(ReadOnlySpan<char> s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
2437internal static DateTime Parse(ReadOnlySpan<char> s, DateTimeFormatInfo dtfi, DateTimeStyles styles, out TimeSpan offset)
2453internal static bool TryParse(ReadOnlySpan<char> s, DateTimeFormatInfo dtfi, DateTimeStyles styles, out DateTime result)
2468internal static bool TryParse(ReadOnlySpan<char> s, DateTimeFormatInfo dtfi, DateTimeStyles styles, out DateTime result, out TimeSpan offset)
2489internal static bool TryParse(ReadOnlySpan<char> s, DateTimeFormatInfo dtfi, DateTimeStyles styles, scoped ref DateTimeResult result)
3345private static bool MatchAbbreviatedMonthName(ref __DTString str, DateTimeFormatInfo dtfi, scoped ref int result, ReadOnlySpan<char> format)
3446private static bool MatchMonthName(ref __DTString str, DateTimeFormatInfo dtfi, scoped ref int result, ReadOnlySpan<char> format)
3547private static bool MatchAbbreviatedDayName(ref __DTString str, DateTimeFormatInfo dtfi, scoped ref int result)
3613private static bool MatchDayName(ref __DTString str, DateTimeFormatInfo dtfi, scoped ref int result)
3692private static bool MatchEraName(ref __DTString str, DateTimeFormatInfo dtfi, scoped ref int result)
3730private static bool MatchTimeMark(ref __DTString str, DateTimeFormatInfo dtfi, scoped ref TM result)
3785private static bool MatchAbbreviatedTimeMark(ref __DTString str, DateTimeFormatInfo dtfi, scoped ref TM result)
3949private static string ExpandPredefinedFormat(char format, scoped ref DateTimeFormatInfo dtfi, scoped ref ParsingInfo parseInfo, scoped ref DateTimeResult result)
3961dtfi = DateTimeFormatInfo.InvariantInfo;
3967dtfi = DateTimeFormatInfo.InvariantInfo;
3977dtfi = DateTimeFormatInfo.InvariantInfo;
3992dtfi = (DateTimeFormatInfo)dtfi.Clone();
4005private static bool ParseJapaneseEraStart(ref __DTString str, DateTimeFormatInfo dtfi)
4013if (str.m_current != DateTimeFormatInfo.JapaneseEraStart[0])
4028DateTimeFormatInfo dtfi,
4592DateTimeFormatInfo dtfi,
5263private static void DTFITrace(DateTimeFormatInfo dtfi)
5402internal __DTString(ReadOnlySpan<char> str, DateTimeFormatInfo dtfi, bool checkDigitToken) : this(str, dtfi)
5407internal __DTString(ReadOnlySpan<char> str, DateTimeFormatInfo dtfi)
5459internal void GetRegularToken(out TokenType tokenType, out int tokenValue, DateTimeFormatInfo dtfi)
5550internal TokenType GetSeparatorToken(DateTimeFormatInfo dtfi, out int indexBeforeSeparator, out char charBeforeSeparator)
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (6)
37return FormatG(value, DateTimeFormatInfo.GetInstance(formatProvider), c == 'G' ? StandardFormat.G : StandardFormat.g);
44FormatCustomized(value, format, DateTimeFormatInfo.GetInstance(formatProvider), ref vlb);
73return TryFormatStandard(value, sf, DateTimeFormatInfo.GetInstance(formatProvider).DecimalSeparatorTChar<TChar>(), destination, out charsWritten);
78FormatCustomized(value, format, DateTimeFormatInfo.GetInstance(formatProvider), ref vlb);
91private static string FormatG(TimeSpan value, DateTimeFormatInfo dtfi, StandardFormat format)
297private static void FormatCustomized<TChar>(TimeSpan value, scoped ReadOnlySpan<char> format, DateTimeFormatInfo dtfi, ref ValueListBuilder<TChar> result) where TChar : unmanaged, IUtfChar<TChar>
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.StringSerializer.cs (4)
64serializedText.AppendSpanFormattable(rule.DateStart, DateTimeFormat, DateTimeFormatInfo.InvariantInfo);
66serializedText.AppendSpanFormattable(rule.DateEnd, DateTimeFormat, DateTimeFormatInfo.InvariantInfo);
157serializedText.AppendSpanFormattable(time.TimeOfDay, TimeOfDayFormat, DateTimeFormatInfo.InvariantInfo);
334if (!DateTime.TryParseExact(token, format, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out DateTime time))
System.Private.DataContractSerialization (2)
System.Private.Xml (10)
System\Xml\XmlConvert.cs (8)
699return value.ToString(format, DateTimeFormatInfo.InvariantInfo);
737return value.ToString(format, DateTimeFormatInfo.InvariantInfo);
1202return DateTime.ParseExact(s, format, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite);
1207return DateTime.ParseExact(s, formats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite);
1251return DateTimeOffset.ParseExact(s, format, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite);
1258return DateTimeOffset.ParseExact(s, formats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite);
1756return value.TryFormat(destination, out charsWritten, format, DateTimeFormatInfo.InvariantInfo);
1799return value.TryFormat(destination, out charsWritten, format, DateTimeFormatInfo.InvariantInfo);
System.Runtime (1)
System.Security.Cryptography (3)
System.ServiceModel.Http (1)
System.ServiceModel.Primitives (2)
System.Windows.Forms.Tests (4)
System.Xaml (2)