2 instantiations of DateTimeFormatInfo
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\FileSystem.vb (1)
43Dim dfi As New DateTimeFormatInfo
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (1)
739DateTimeFormatInfo temp = new DateTimeFormatInfo(_cultureData, this.Calendar);
281 references to DateTimeFormatInfo
Aspire.Dashboard (3)
Components\Controls\Chart\PlotlyChart.razor.cs (3)
73var is24Hour = DateTimeFormatInfo.CurrentInfo.LongTimePattern.StartsWith("H", StringComparison.Ordinal); 78Periods = [DateTimeFormatInfo.CurrentInfo.AMDesignator, DateTimeFormatInfo.CurrentInfo.PMDesignator],
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\Serialization\XmlCustomFormatter.cs (1)
344return DateTime.ParseExact(value, s_allTimeFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite | DateTimeStyles.NoCurrentDateDefault);
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);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
1137if (DateTimeOffset.TryParse(value, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowWhiteSpaces | DateTimeStyles.AssumeLocal, out modifiedSinceDate))
Microsoft.AspNetCore.Http (2)
src\Shared\HttpRuleParser.cs (2)
190DateTimeFormatInfo invariant = DateTimeFormatInfo.InvariantInfo;
Microsoft.AspNetCore.Mvc.Core (2)
src\Shared\HttpRuleParser.cs (2)
190DateTimeFormatInfo invariant = DateTimeFormatInfo.InvariantInfo;
Microsoft.AspNetCore.Routing (2)
src\Shared\HttpRuleParser.cs (2)
190DateTimeFormatInfo invariant = DateTimeFormatInfo.InvariantInfo;
Microsoft.CodeAnalysis.CodeStyle (1)
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
209|| IsType<DateTimeFormatInfo>(member.ContainingType, operation.SemanticModel);
Microsoft.CodeAnalysis.Features (1)
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
209|| IsType<DateTimeFormatInfo>(member.ContainingType, operation.SemanticModel);
Microsoft.Net.Http.Headers (2)
src\Shared\HttpRuleParser.cs (2)
190DateTimeFormatInfo invariant = DateTimeFormatInfo.InvariantInfo;
Microsoft.VisualBasic.Core (6)
Microsoft\VisualBasic\CompilerServices\Utils.vb (1)
68Friend Shared Function GetDateTimeFormatInfo() As DateTimeFormatInfo
Microsoft\VisualBasic\DateAndTime.vb (3)
494DayOfWeek = CType(DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek + 1, FirstDayOfWeek) 532Dim dtfi As DateTimeFormatInfo 543dtfi = CType(GetCultureInfo().GetFormat(GetType(System.Globalization.DateTimeFormatInfo)), DateTimeFormatInfo) 'Returns a read-only object
Microsoft\VisualBasic\FileSystem.vb (2)
41Friend ReadOnly m_WriteDateFormatInfo As DateTimeFormatInfo = InitializeWriteDateFormatInfo() ' Call static initializer due to FxCop InitializeReferenceTypeStaticFieldsInline. 42Private Function InitializeWriteDateFormatInfo() As DateTimeFormatInfo
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
256[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.DateTimeFormatInfo))]
netstandard (1)
netstandard.cs (1)
826[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.DateTimeFormatInfo))]
PresentationFramework (12)
System\Windows\Automation\Peers\CalendarAutomationPeer.cs (1)
501DateTimeFormatInfo format = DateTimeHelper.GetCurrentDateFormat();
System\Windows\Controls\DatePicker.cs (2)
995DateTimeFormatInfo dtfi = DateTimeHelper.GetDateFormat(DateTimeHelper.GetCulture(this)); 1279DateTimeFormatInfo dtfi = DateTimeHelper.GetDateFormat(DateTimeHelper.GetCulture(this));
System\Windows\Controls\DateTimeHelper.cs (9)
102public static DateTimeFormatInfo GetCurrentDateFormat() 122internal static DateTimeFormatInfo GetDateFormat(CultureInfo culture) 131DateTimeFormatInfo dtfi = null; 193DateTimeFormatInfo format = GetDateFormat(culture); 207DateTimeFormatInfo format = DateTimeHelper.GetDateFormat(DateTimeHelper.GetCulture(fe)); 223DateTimeFormatInfo format = GetDateFormat(culture); 236DateTimeFormatInfo format = GetDateFormat(culture); 249DateTimeFormatInfo format = GetDateFormat(culture); 266DateTimeFormatInfo format = GetDateFormat(culture);
ReachFramework (1)
Packaging\XPSSignatureDefinition.cs (1)
379writer.WriteString(((DateTime)SignBy).ToUniversalTime().ToString("s", DateTimeFormatInfo.InvariantInfo) + "Z");
System.ComponentModel.TypeConverter (18)
System\ComponentModel\DateOnlyConverter.cs (3)
48DateTimeFormatInfo? formatInfo = null; 52formatInfo = (DateTimeFormatInfo?)culture.GetFormat(typeof(DateTimeFormatInfo));
System\ComponentModel\DateTimeConverter.cs (6)
52DateTimeFormatInfo? formatInfo = null; 56formatInfo = (DateTimeFormatInfo?)culture.GetFormat(typeof(DateTimeFormatInfo)); 93DateTimeFormatInfo? formatInfo = (DateTimeFormatInfo?)culture.GetFormat(typeof(DateTimeFormatInfo));
System\ComponentModel\DateTimeOffsetConverter.cs (6)
52DateTimeFormatInfo? formatInfo = null; 56formatInfo = (DateTimeFormatInfo?)culture.GetFormat(typeof(DateTimeFormatInfo)); 95DateTimeFormatInfo? formatInfo; 96formatInfo = (DateTimeFormatInfo?)culture.GetFormat(typeof(DateTimeFormatInfo));
System\ComponentModel\TimeOnlyConverter.cs (3)
48DateTimeFormatInfo? formatInfo = null; 52formatInfo = (DateTimeFormatInfo?)culture.GetFormat(typeof(DateTimeFormatInfo));
System.Data.Common (3)
System\Data\SQLTypes\SQLDateTime.cs (3)
354DateTimeFormatInfo dtfi = (DateTimeFormatInfo)(CultureInfo.CurrentCulture.GetFormat(typeof(DateTimeFormatInfo)))!;
System.Globalization (1)
System.Globalization.cs (1)
9[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.DateTimeFormatInfo))]
System.Net.Http (2)
src\libraries\Common\src\System\Net\HttpDateParser.cs (2)
49DateTimeOffset.TryParseExact(input, "r", DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out result) || 50DateTimeOffset.TryParseExact(input, s_dateFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowInnerWhite | DateTimeStyles.AssumeUniversal, out result);
System.Net.Requests (2)
src\libraries\Common\src\System\Net\HttpDateParser.cs (2)
49DateTimeOffset.TryParseExact(input, "r", DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out result) || 50DateTimeOffset.TryParseExact(input, s_dateFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowInnerWhite | DateTimeStyles.AssumeUniversal, out result);
System.Private.CoreLib (184)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Utf8Formatter\Utf8Formatter.TimeSpan.cs (1)
38decimalSeparator = DateTimeFormatInfo.InvariantInfo.DecimalSeparatorTChar<byte>();
src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (5)
449if (!DateTimeParse.TryParse(s, DateTimeFormatInfo.GetInstance(provider), style, ref dtResult)) 514if (!DateTimeParse.TryParseExact(s, format, DateTimeFormatInfo.GetInstance(provider), style, ref dtResult)) 560DateTimeFormatInfo dtfi = DateTimeFormatInfo.GetInstance(provider); 564DateTimeFormatInfo dtfiToUse = dtfi;
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\CultureInfo.cs (8)
62internal DateTimeFormatInfo? _dateTimeInfo; 670if (formatType == typeof(DateTimeFormatInfo)) 732public virtual DateTimeFormatInfo DateTimeFormat 739DateTimeFormatInfo temp = new DateTimeFormatInfo(_cultureData, this.Calendar); 889ci._dateTimeInfo = (DateTimeFormatInfo)_dateTimeInfo.Clone(); 898ci.DateTimeFormat = (DateTimeFormatInfo)this.DateTimeFormat.Clone(); 941newInfo._dateTimeInfo = DateTimeFormatInfo.ReadOnly(ci._dateTimeInfo); 950newInfo.DateTimeFormat = DateTimeFormatInfo.ReadOnly(ci.DateTimeFormat);
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\DateTimeFormatInfo.cs (25)
285public static DateTimeFormatInfo InvariantInfo => DateTimeFormat.InvariantFormatInfo; 290public static DateTimeFormatInfo CurrentInfo 297DateTimeFormatInfo? info = culture._dateTimeInfo; 303return (DateTimeFormatInfo)culture.GetFormat(typeof(DateTimeFormatInfo))!; 307public static DateTimeFormatInfo GetInstance(IFormatProvider? provider) 311static DateTimeFormatInfo GetProviderNonNull(IFormatProvider provider) 319provider as DateTimeFormatInfo ?? 320provider.GetFormat(typeof(DateTimeFormatInfo)) as DateTimeFormatInfo ?? 327return formatType == typeof(DateTimeFormatInfo) ? this : null; 332DateTimeFormatInfo n = (DateTimeFormatInfo)MemberwiseClone(); 1541public static DateTimeFormatInfo ReadOnly(DateTimeFormatInfo dtfi) 1550DateTimeFormatInfo newInfo = (DateTimeFormatInfo)(dtfi.MemberwiseClone()); 1872private static DateTimeFormatInfo? s_jajpDTFI; 1873private static DateTimeFormatInfo? s_zhtwDTFI; 1881internal static DateTimeFormatInfo GetJapaneseCalendarDTFI() 1883DateTimeFormatInfo? temp = s_jajpDTFI; 1899internal static DateTimeFormatInfo GetTaiwanCalendarDTFI() 1901DateTimeFormatInfo? temp = s_zhtwDTFI; 2118DateTimeFormatInfo jaDtfi = GetJapaneseCalendarDTFI(); 2131DateTimeFormatInfo twDtfi = GetTaiwanCalendarDTFI();
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfoScanner.cs (1)
479internal string[]? GetDateWordsOfDTFI(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\Globalization\TimeSpanParse.cs (2)
405internal void Init(DateTimeFormatInfo dtfi) 705raw.Init(DateTimeFormatInfo.GetInstance(formatProvider));
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (5)
619if (!DateTimeParse.TryParse(s, DateTimeFormatInfo.GetInstance(provider), style, ref dtResult)) 685if (!DateTimeParse.TryParseExact(s, format, DateTimeFormatInfo.GetInstance(provider), style, ref dtResult)) 730DateTimeFormatInfo dtfi = DateTimeFormatInfo.GetInstance(provider); 734DateTimeFormatInfo dtfiToUse = dtfi;
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\Runtime\Serialization\ExtensionDataReader.cs (1)
693_value = dateTime.ToString("yyyy-MM-ddTHH:mm:ss.fffffffK", DateTimeFormatInfo.InvariantInfo);
System\Runtime\Serialization\Json\DateTimeFormat.cs (1)
25public DateTimeFormat(string formatString) : this(formatString, DateTimeFormatInfo.CurrentInfo)
System.Private.Xml (10)
System\Xml\Serialization\Xmlcustomformatter.cs (2)
400return DateTime.ParseExact(value, s_allTimeFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite | DateTimeStyles.NoCurrentDateDefault | DateTimeStyles.RoundtripKind); 404return DateTime.ParseExact(value, s_allTimeFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite | DateTimeStyles.NoCurrentDateDefault);
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)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
228[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Globalization.DateTimeFormatInfo))]
System.Security.Cryptography (3)
System\Security\Cryptography\X509Certificates\OpenSslX509CertificateReader.cs (3)
16private static DateTimeFormatInfo? s_validityDateTimeFormatInfo; 890DateTimeFormatInfo validityFormatInfo = 891(DateTimeFormatInfo)CultureInfo.InvariantCulture.DateTimeFormat.Clone();
System.ServiceModel.Http (1)
System\ServiceModel\Channels\HttpChannelFactory.cs (1)
1252if (DateTimeOffset.TryParse(value, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowWhiteSpaces | DateTimeStyles.AssumeLocal, out modifiedSinceDate))
System.ServiceModel.Primitives (2)
System\ServiceModel\Security\WSTrust.cs (2)
374WSUtilitySpecificationVersion.AcceptedDateTimeFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None).ToUniversalTime(); 380WSUtilitySpecificationVersion.AcceptedDateTimeFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None).ToUniversalTime();
System.Windows.Forms.Tests (4)
System\Windows\Forms\DateTimePickerTests.cs (4)
958DateTimeFormatInfo dateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat; 972DateTimeFormatInfo dateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat; 986DateTimeFormatInfo dateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat; 1000DateTimeFormatInfo dateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat;
System.Xaml (2)
System\Windows\Markup\DateTimeValueSerializer.cs (2)
54return DateTime.Parse(value, DateTimeFormatInfo.InvariantInfo, DateTimeStyles); 106return dateTime.ToString(formatString, DateTimeFormatInfo.InvariantInfo);