From 3492a9fde52cde82740dcde9399f6718acf630d5 Mon Sep 17 00:00:00 2001 From: Luiz Strobelt Date: Mon, 25 Oct 2021 18:45:51 -0300 Subject: [PATCH 01/12] Create first tests --- .../Humanizer.Tests.Shared.projitems | 3 +- .../TimeOnlyHumanizeClockTimeStrategyTests.cs | 41 +++++++++++++++++++ ...> TimeOnlyHumanizeDefaultStrategyTests.cs} | 8 ++-- .../ClockTimeTimeOnlyHumanizeStrategy.cs | 19 +++++++++ .../DateTimeHumanizeAlgorithms.cs | 7 ++++ 5 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 src/Humanizer.Tests.Shared/TimeOnlyHumanizeClockTimeStrategyTests.cs rename src/Humanizer.Tests.Shared/{TimeOnlyHumanizeTests.cs => TimeOnlyHumanizeDefaultStrategyTests.cs} (92%) create mode 100644 src/Humanizer/DateTimeHumanizeStrategy/ClockTimeTimeOnlyHumanizeStrategy.cs diff --git a/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems b/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems index d2a2bcb77..9081db7a7 100644 --- a/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems +++ b/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems @@ -36,7 +36,8 @@ - + + diff --git a/src/Humanizer.Tests.Shared/TimeOnlyHumanizeClockTimeStrategyTests.cs b/src/Humanizer.Tests.Shared/TimeOnlyHumanizeClockTimeStrategyTests.cs new file mode 100644 index 000000000..5416377f2 --- /dev/null +++ b/src/Humanizer.Tests.Shared/TimeOnlyHumanizeClockTimeStrategyTests.cs @@ -0,0 +1,41 @@ +#if NET6_0_OR_GREATER + +using System; +using Humanizer.Configuration; +using Humanizer.DateTimeHumanizeStrategy; +using Xunit; + +namespace Humanizer.Tests +{ + [UseCulture("en-US")] + public class TimeOnlyHumanizeClockStrategyTests + { + [Theory] + [InlineData(00, 00, "midnight")] + [InlineData(04, 00, "four o'clock")] + [InlineData(05, 01, "one past five")] + [InlineData(06, 05, "five past six")] + [InlineData(10, 15, "a quarter past ten")] + [InlineData(11, 30, "half past eleven")] + [InlineData(12, 00, "noon")] + [InlineData(14, 32, "twenty-eight to three")] + [InlineData(15, 35, "twenty-five to four")] + [InlineData(16, 40, "twenty to five")] + [InlineData(17, 45, "a quarter to six")] + [InlineData(18, 50, "ten to seven")] + [InlineData(19, 55, "five to eight")] + [InlineData(20, 59, "one to nine")] + public void ClockTime(int hours, int minutes, string expectedResult) + { + Configurator.TimeOnlyHumanizeStrategy = new ClockTimeTimeOnlyHumanizeStrategy(); + + var inputTime = new TimeOnly(hours, minutes); + + var actualResult = inputTime.Humanize(); + + Assert.Equal(expectedResult, actualResult); + } + } +} + +#endif diff --git a/src/Humanizer.Tests.Shared/TimeOnlyHumanizeTests.cs b/src/Humanizer.Tests.Shared/TimeOnlyHumanizeDefaultStrategyTests.cs similarity index 92% rename from src/Humanizer.Tests.Shared/TimeOnlyHumanizeTests.cs rename to src/Humanizer.Tests.Shared/TimeOnlyHumanizeDefaultStrategyTests.cs index ee50ce3c0..d5bc98ce1 100644 --- a/src/Humanizer.Tests.Shared/TimeOnlyHumanizeTests.cs +++ b/src/Humanizer.Tests.Shared/TimeOnlyHumanizeDefaultStrategyTests.cs @@ -8,11 +8,11 @@ namespace Humanizer.Tests { [UseCulture("en-US")] - public class TimeOnlyHumanizeTests + public class TimeOnlyHumanizeDefaultStrategyTests { [Fact] - public void DefaultStrategy_SameTime() + public void SameTime() { Configurator.TimeOnlyHumanizeStrategy = new DefaultTimeOnlyHumanizeStrategy(); @@ -26,7 +26,7 @@ public void DefaultStrategy_SameTime() } [Fact] - public void DefaultStrategy_HoursApart() + public void HoursApart() { Configurator.TimeOnlyHumanizeStrategy = new DefaultTimeOnlyHumanizeStrategy(); @@ -40,7 +40,7 @@ public void DefaultStrategy_HoursApart() } [Fact] - public void DefaultStrategy_HoursAgo() + public void HoursAgo() { Configurator.TimeOnlyHumanizeStrategy = new DefaultTimeOnlyHumanizeStrategy(); diff --git a/src/Humanizer/DateTimeHumanizeStrategy/ClockTimeTimeOnlyHumanizeStrategy.cs b/src/Humanizer/DateTimeHumanizeStrategy/ClockTimeTimeOnlyHumanizeStrategy.cs new file mode 100644 index 000000000..efa82d632 --- /dev/null +++ b/src/Humanizer/DateTimeHumanizeStrategy/ClockTimeTimeOnlyHumanizeStrategy.cs @@ -0,0 +1,19 @@ +#if NET6_0_OR_GREATER + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; + +namespace Humanizer.DateTimeHumanizeStrategy +{ + public class ClockTimeTimeOnlyHumanizeStrategy : ITimeOnlyHumanizeStrategy + { + public string Humanize(TimeOnly input, TimeOnly comparisonBase, CultureInfo culture) + { + return DateTimeHumanizeAlgorithms.ClockTimeHumanize(input, culture); + } + } +} + +#endif diff --git a/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs b/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs index fb34cf7c7..a2d62bf43 100644 --- a/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs +++ b/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs @@ -10,6 +10,13 @@ namespace Humanizer.DateTimeHumanizeStrategy /// internal static class DateTimeHumanizeAlgorithms { +#if NET6_0_OR_GREATER + public static string ClockTimeHumanize(TimeOnly input, CultureInfo culture) + { + return "3 o'clock"; + } +#endif + /// /// Returns localized & humanized distance of time between two dates; given a specific precision. /// From f04596ccad15e2c30c108970301e991c1c28985a Mon Sep 17 00:00:00 2001 From: Luiz Strobelt Date: Mon, 25 Oct 2021 21:59:13 -0300 Subject: [PATCH 02/12] Make first simple version with tests passing --- ...provalTest.approve_public_api.approved.txt | 5 ++++ .../DateTimeHumanizeAlgorithms.cs | 23 +++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt index cfc0bca08..157887bc6 100644 --- a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt +++ b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt @@ -1750,6 +1750,11 @@ namespace Humanizer.Configuration } namespace Humanizer.DateTimeHumanizeStrategy { + public class ClockTimeTimeOnlyHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.ITimeOnlyHumanizeStrategy + { + public ClockTimeTimeOnlyHumanizeStrategy() { } + public string Humanize(System.TimeOnly input, System.TimeOnly comparisonBase, System.Globalization.CultureInfo culture) { } + } public class DefaultDateOnlyHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateOnlyHumanizeStrategy { public DefaultDateOnlyHumanizeStrategy() { } diff --git a/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs b/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs index a2d62bf43..546915cfa 100644 --- a/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs +++ b/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs @@ -1,5 +1,6 @@ using System; using System.Globalization; + using Humanizer.Configuration; using Humanizer.Localisation; @@ -13,7 +14,25 @@ internal static class DateTimeHumanizeAlgorithms #if NET6_0_OR_GREATER public static string ClockTimeHumanize(TimeOnly input, CultureInfo culture) { - return "3 o'clock"; + switch (input) + { + case { Hour: 0, Minute: 0 }: + return "midnight"; + case { Hour: 12, Minute: 0 }: + return "noon"; + } + + var normalizedHour = input.Hour % 12; + + return input switch + { + { Minute: 0 } => $"{normalizedHour.ToWords(culture)} o'clock", + { Minute: 15 } => $"a quarter past {normalizedHour.ToWords(culture)}", + { Minute: 30 } => $"half past {normalizedHour.ToWords(culture)}", + { Minute: 45 } => $"a quarter to {(normalizedHour + 1).ToWords(culture)}", + { Minute: < 30 } => $"{input.Minute.ToWords(culture)} past {normalizedHour.ToWords(culture)}", + { Minute: > 30 } => $"{(60 - input.Minute).ToWords(culture)} to {(normalizedHour + 1).ToWords(culture)}" + }; } #endif @@ -219,7 +238,7 @@ private static string DefaultHumanize(TimeSpan ts, bool sameMonth, int days, Ten } if (ts.TotalHours < 48) - { + { return formatter.DateHumanize(TimeUnit.Day, tense, days); } From 74db5cbd6933f2796f0b9e4e4cdeb351c848fb78 Mon Sep 17 00:00:00 2001 From: Luiz Strobelt Date: Mon, 25 Oct 2021 23:49:28 -0300 Subject: [PATCH 03/12] Redo everything as a converter and extension --- .../Humanizer.Tests.Shared.projitems | 3 +- .../en/TimeToClockNotationTests.cs | 36 ++++++++++++++++ .../TimeOnlyHumanizeClockTimeStrategyTests.cs | 41 ------------------- ...ategyTests.cs => TimeOnlyHumanizeTests.cs} | 8 ++-- ...provalTest.approve_public_api.approved.txt | 22 +++++++--- src/Humanizer/Configuration/Configurator.cs | 20 +++++++++ ...meOnlyToClockNotationConvertersRegistry.cs | 19 +++++++++ .../ClockTimeTimeOnlyHumanizeStrategy.cs | 19 --------- .../DateTimeHumanizeAlgorithms.cs | 25 ----------- ...DefaultTimeOnlyToClockNotationConverter.cs | 40 ++++++++++++++++++ .../ITimeOnlyToClockNotationConverter.cs | 23 +++++++++++ .../TimeOnlyToClockNotationExtensions.cs | 25 +++++++++++ 12 files changed, 185 insertions(+), 96 deletions(-) create mode 100644 src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs delete mode 100644 src/Humanizer.Tests.Shared/TimeOnlyHumanizeClockTimeStrategyTests.cs rename src/Humanizer.Tests.Shared/{TimeOnlyHumanizeDefaultStrategyTests.cs => TimeOnlyHumanizeTests.cs} (92%) create mode 100644 src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs delete mode 100644 src/Humanizer/DateTimeHumanizeStrategy/ClockTimeTimeOnlyHumanizeStrategy.cs create mode 100644 src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs create mode 100644 src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs create mode 100644 src/Humanizer/TimeOnlyToClockNotationExtensions.cs diff --git a/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems b/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems index 9081db7a7..d2a2bcb77 100644 --- a/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems +++ b/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems @@ -36,8 +36,7 @@ - - + diff --git a/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs b/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs new file mode 100644 index 000000000..4758ef650 --- /dev/null +++ b/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs @@ -0,0 +1,36 @@ +#if NET6_0_OR_GREATER + +using System; +using Xunit; + +namespace Humanizer.Tests.Localisation.en +{ + public class TimeToClockNotationTests + { + [UseCulture("en-US")] + [Theory] + [InlineData(00, 00, "midnight")] + [InlineData(04, 00, "four o'clock")] + [InlineData(05, 01, "five one")] + [InlineData(06, 05, "five past six")] + [InlineData(07, 10, "ten past seven")] + [InlineData(08, 15, "a quarter past eight")] + [InlineData(09, 20, "twenty past nine")] + [InlineData(10, 25, "twenty-five past ten")] + [InlineData(11, 30, "half past eleven")] + [InlineData(12, 00, "noon")] + [InlineData(15, 35, "three thirty-five")] + [InlineData(16, 40, "twenty to five")] + [InlineData(17, 45, "a quarter to six")] + [InlineData(18, 50, "ten to seven")] + [InlineData(19, 55, "five to eight")] + [InlineData(20, 59, "eight fifty-nine")] + public void ConvertToClockNotationTimeOnlyStringUs(int hours, int minutes, string expectedResult) + { + var actualResult = new TimeOnly(hours, minutes).ToClockNotation(); + Assert.Equal(expectedResult, actualResult); + } + } +} + +#endif diff --git a/src/Humanizer.Tests.Shared/TimeOnlyHumanizeClockTimeStrategyTests.cs b/src/Humanizer.Tests.Shared/TimeOnlyHumanizeClockTimeStrategyTests.cs deleted file mode 100644 index 5416377f2..000000000 --- a/src/Humanizer.Tests.Shared/TimeOnlyHumanizeClockTimeStrategyTests.cs +++ /dev/null @@ -1,41 +0,0 @@ -#if NET6_0_OR_GREATER - -using System; -using Humanizer.Configuration; -using Humanizer.DateTimeHumanizeStrategy; -using Xunit; - -namespace Humanizer.Tests -{ - [UseCulture("en-US")] - public class TimeOnlyHumanizeClockStrategyTests - { - [Theory] - [InlineData(00, 00, "midnight")] - [InlineData(04, 00, "four o'clock")] - [InlineData(05, 01, "one past five")] - [InlineData(06, 05, "five past six")] - [InlineData(10, 15, "a quarter past ten")] - [InlineData(11, 30, "half past eleven")] - [InlineData(12, 00, "noon")] - [InlineData(14, 32, "twenty-eight to three")] - [InlineData(15, 35, "twenty-five to four")] - [InlineData(16, 40, "twenty to five")] - [InlineData(17, 45, "a quarter to six")] - [InlineData(18, 50, "ten to seven")] - [InlineData(19, 55, "five to eight")] - [InlineData(20, 59, "one to nine")] - public void ClockTime(int hours, int minutes, string expectedResult) - { - Configurator.TimeOnlyHumanizeStrategy = new ClockTimeTimeOnlyHumanizeStrategy(); - - var inputTime = new TimeOnly(hours, minutes); - - var actualResult = inputTime.Humanize(); - - Assert.Equal(expectedResult, actualResult); - } - } -} - -#endif diff --git a/src/Humanizer.Tests.Shared/TimeOnlyHumanizeDefaultStrategyTests.cs b/src/Humanizer.Tests.Shared/TimeOnlyHumanizeTests.cs similarity index 92% rename from src/Humanizer.Tests.Shared/TimeOnlyHumanizeDefaultStrategyTests.cs rename to src/Humanizer.Tests.Shared/TimeOnlyHumanizeTests.cs index d5bc98ce1..ee50ce3c0 100644 --- a/src/Humanizer.Tests.Shared/TimeOnlyHumanizeDefaultStrategyTests.cs +++ b/src/Humanizer.Tests.Shared/TimeOnlyHumanizeTests.cs @@ -8,11 +8,11 @@ namespace Humanizer.Tests { [UseCulture("en-US")] - public class TimeOnlyHumanizeDefaultStrategyTests + public class TimeOnlyHumanizeTests { [Fact] - public void SameTime() + public void DefaultStrategy_SameTime() { Configurator.TimeOnlyHumanizeStrategy = new DefaultTimeOnlyHumanizeStrategy(); @@ -26,7 +26,7 @@ public void SameTime() } [Fact] - public void HoursApart() + public void DefaultStrategy_HoursApart() { Configurator.TimeOnlyHumanizeStrategy = new DefaultTimeOnlyHumanizeStrategy(); @@ -40,7 +40,7 @@ public void HoursApart() } [Fact] - public void HoursAgo() + public void DefaultStrategy_HoursAgo() { Configurator.TimeOnlyHumanizeStrategy = new DefaultTimeOnlyHumanizeStrategy(); diff --git a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt index 157887bc6..759acd8cf 100644 --- a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt +++ b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt @@ -1581,6 +1581,10 @@ namespace Humanizer public static string Humanize(this string input) { } public static string Humanize(this string input, Humanizer.LetterCasing casing) { } } + public class static TimeOnlyToClockNotationExtensions + { + public static string ToClockNotation(this System.TimeOnly input) { } + } public class static TimeSpanHumanizeExtensions { public static string Humanize(this System.TimeSpan timeSpan, int precision = 1, System.Globalization.CultureInfo culture = null, Humanizer.Localisation.TimeUnit maxUnit = 5, Humanizer.Localisation.TimeUnit minUnit = 0, string collectionSeparator = ", ", bool toWords = False) { } @@ -1736,6 +1740,7 @@ namespace Humanizer.Configuration public static Humanizer.Configuration.LocaliserRegistry NumberToWordsConverters { get; } public static Humanizer.Configuration.LocaliserRegistry Ordinalizers { get; } public static Humanizer.DateTimeHumanizeStrategy.ITimeOnlyHumanizeStrategy TimeOnlyHumanizeStrategy { get; set; } + public static Humanizer.Configuration.LocaliserRegistry TimeOnlyToClockNotationConverters { get; } } public class LocaliserRegistry where TLocaliser : class @@ -1750,11 +1755,6 @@ namespace Humanizer.Configuration } namespace Humanizer.DateTimeHumanizeStrategy { - public class ClockTimeTimeOnlyHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.ITimeOnlyHumanizeStrategy - { - public ClockTimeTimeOnlyHumanizeStrategy() { } - public string Humanize(System.TimeOnly input, System.TimeOnly comparisonBase, System.Globalization.CultureInfo culture) { } - } public class DefaultDateOnlyHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateOnlyHumanizeStrategy { public DefaultDateOnlyHumanizeStrategy() { } @@ -1950,4 +1950,16 @@ namespace Humanizer.Localisation.Ordinalizers string Convert(int number, string numberString); string Convert(int number, string numberString, Humanizer.GrammaticalGender gender); } +} +namespace Humanizer.Localisation.TimeToClockNotation +{ + public interface ITimeOnlyToClockNotationConverter + { + string Convert(System.TimeOnly time); + } + public class TimeOnlyToClockNotationConverter : Humanizer.Localisation.TimeToClockNotation.ITimeOnlyToClockNotationConverter + { + public TimeOnlyToClockNotationConverter() { } + public virtual string Convert(System.TimeOnly time) { } + } } \ No newline at end of file diff --git a/src/Humanizer/Configuration/Configurator.cs b/src/Humanizer/Configuration/Configurator.cs index f9e5dcbae..6c2c3b23d 100644 --- a/src/Humanizer/Configuration/Configurator.cs +++ b/src/Humanizer/Configuration/Configurator.cs @@ -7,6 +7,9 @@ using Humanizer.Localisation.Formatters; using Humanizer.Localisation.NumberToWords; using Humanizer.Localisation.Ordinalizers; +#if NET6_0_OR_GREATER +using Humanizer.Localisation.TimeToClockNotation; +#endif namespace Humanizer.Configuration { @@ -70,6 +73,15 @@ public static LocaliserRegistry DateOnlyToOrdin { get { return _dateOnlyToOrdinalWordConverters; } } + + private static readonly LocaliserRegistry _timeOnlyToClockNotationConverters = new TimeOnlyToClockNotationConvertersRegistry(); + /// + /// A registry of ordinalizers used to localise Ordinalize method + /// + public static LocaliserRegistry TimeOnlyToClockNotationConverters + { + get { return _timeOnlyToClockNotationConverters; } + } #endif internal static ICollectionFormatter CollectionFormatter @@ -131,6 +143,14 @@ internal static IDateOnlyToOrdinalWordConverter DateOnlyToOrdinalWordsConverter return DateOnlyToOrdinalWordsConverters.ResolveForUiCulture(); } } + + internal static ITimeOnlyToClockNotationConverter TimeOnlyToClockNotationConverter + { + get + { + return TimeOnlyToClockNotationConverters.ResolveForUiCulture(); + } + } #endif private static IDateTimeHumanizeStrategy _dateTimeHumanizeStrategy = new DefaultDateTimeHumanizeStrategy(); diff --git a/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs b/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs new file mode 100644 index 000000000..aad73ef7a --- /dev/null +++ b/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs @@ -0,0 +1,19 @@ +#if NET6_0_OR_GREATER + +using Humanizer.Localisation.TimeToClockNotation; + +namespace Humanizer.Configuration +{ + internal class TimeOnlyToClockNotationConvertersRegistry : LocaliserRegistry + { + public TimeOnlyToClockNotationConvertersRegistry() : base(new TimeOnlyToClockNotationConverter()) + { + Register("en-US", new TimeOnlyToClockNotationConverter()); + Register("en-UK", new TimeOnlyToClockNotationConverter()); + Register("de", new TimeOnlyToClockNotationConverter()); + Register("pt-BR", new TimeOnlyToClockNotationConverter()); + } + } +} + +#endif diff --git a/src/Humanizer/DateTimeHumanizeStrategy/ClockTimeTimeOnlyHumanizeStrategy.cs b/src/Humanizer/DateTimeHumanizeStrategy/ClockTimeTimeOnlyHumanizeStrategy.cs deleted file mode 100644 index efa82d632..000000000 --- a/src/Humanizer/DateTimeHumanizeStrategy/ClockTimeTimeOnlyHumanizeStrategy.cs +++ /dev/null @@ -1,19 +0,0 @@ -#if NET6_0_OR_GREATER - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Text; - -namespace Humanizer.DateTimeHumanizeStrategy -{ - public class ClockTimeTimeOnlyHumanizeStrategy : ITimeOnlyHumanizeStrategy - { - public string Humanize(TimeOnly input, TimeOnly comparisonBase, CultureInfo culture) - { - return DateTimeHumanizeAlgorithms.ClockTimeHumanize(input, culture); - } - } -} - -#endif diff --git a/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs b/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs index 546915cfa..3a54453fc 100644 --- a/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs +++ b/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs @@ -11,31 +11,6 @@ namespace Humanizer.DateTimeHumanizeStrategy /// internal static class DateTimeHumanizeAlgorithms { -#if NET6_0_OR_GREATER - public static string ClockTimeHumanize(TimeOnly input, CultureInfo culture) - { - switch (input) - { - case { Hour: 0, Minute: 0 }: - return "midnight"; - case { Hour: 12, Minute: 0 }: - return "noon"; - } - - var normalizedHour = input.Hour % 12; - - return input switch - { - { Minute: 0 } => $"{normalizedHour.ToWords(culture)} o'clock", - { Minute: 15 } => $"a quarter past {normalizedHour.ToWords(culture)}", - { Minute: 30 } => $"half past {normalizedHour.ToWords(culture)}", - { Minute: 45 } => $"a quarter to {(normalizedHour + 1).ToWords(culture)}", - { Minute: < 30 } => $"{input.Minute.ToWords(culture)} past {normalizedHour.ToWords(culture)}", - { Minute: > 30 } => $"{(60 - input.Minute).ToWords(culture)} to {(normalizedHour + 1).ToWords(culture)}" - }; - } -#endif - /// /// Returns localized & humanized distance of time between two dates; given a specific precision. /// diff --git a/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs new file mode 100644 index 000000000..f5145f2eb --- /dev/null +++ b/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs @@ -0,0 +1,40 @@ +#if NET6_0_OR_GREATER + +using System; + +namespace Humanizer.Localisation.TimeToClockNotation +{ + public class TimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter + { + public virtual string Convert(TimeOnly time) + { + switch (time) + { + case { Hour: 0, Minute: 0 }: + return "midnight"; + case { Hour: 12, Minute: 0 }: + return "noon"; + } + + var normalizedHour = time.Hour % 12; + + return time switch + { + { Minute: 00 } => $"{normalizedHour.ToWords()} o'clock", + { Minute: 05 } => $"five past {normalizedHour.ToWords()}", + { Minute: 10 } => $"ten past {normalizedHour.ToWords()}", + { Minute: 15 } => $"a quarter past {normalizedHour.ToWords()}", + { Minute: 20 } => $"twenty past {normalizedHour.ToWords()}", + { Minute: 25 } => $"twenty-five past {normalizedHour.ToWords()}", + { Minute: 30 } => $"half past {normalizedHour.ToWords()}", + { Minute: 40 } => $"twenty to {(normalizedHour + 1).ToWords()}", + { Minute: 45 } => $"a quarter to {(normalizedHour + 1).ToWords()}", + { Minute: 50 } => $"ten to {(normalizedHour + 1).ToWords()}", + { Minute: 55 } => $"five to {(normalizedHour + 1).ToWords()}", + _ => $"{normalizedHour.ToWords()} {time.Minute.ToWords()}" + }; + } + } +} + +#endif diff --git a/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs new file mode 100644 index 000000000..659adf5b7 --- /dev/null +++ b/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs @@ -0,0 +1,23 @@ +#if NET6_0_OR_GREATER + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Humanizer.Localisation.TimeToClockNotation +{ + /// + /// The interface used to localise the ToClockWords method. + /// + public interface ITimeOnlyToClockNotationConverter + { + /// + /// Converts the time to Clock Words + /// + /// + /// + string Convert(TimeOnly time); + } +} + +#endif diff --git a/src/Humanizer/TimeOnlyToClockNotationExtensions.cs b/src/Humanizer/TimeOnlyToClockNotationExtensions.cs new file mode 100644 index 000000000..a56f0f443 --- /dev/null +++ b/src/Humanizer/TimeOnlyToClockNotationExtensions.cs @@ -0,0 +1,25 @@ +#if NET6_0_OR_GREATER + +using System; +using Humanizer.Configuration; + +namespace Humanizer +{ + /// + /// Humanizes DateTime into human readable sentence + /// + public static class TimeOnlyToClockNotationExtensions + { + /// + /// Turns the provided time into clock notation + /// + /// The time to be made into clock notation + /// The time in clock notation + public static string ToClockNotation(this TimeOnly input) + { + return Configurator.TimeOnlyToClockNotationConverter.Convert(input); + } + } +} + +#endif From 20f734308f5f2d9eb86dcaa39b7c718c28e33d45 Mon Sep 17 00:00:00 2001 From: Luiz Strobelt Date: Wed, 27 Oct 2021 00:41:08 -0300 Subject: [PATCH 04/12] Add ptBR time to clock notation converter --- .../en/TimeToClockNotationTests.cs | 26 +- ...lTest.Approve_Public_Api.approved.txt.orig | 1955 +++++++++++++++++ ...provalTest.approve_public_api.approved.txt | 9 +- ...meOnlyToClockNotationConvertersRegistry.cs | 10 +- ...DefaultTimeOnlyToClockNotationConverter.cs | 2 +- .../PtBrTimeOnlyToClockNotationConverter.cs | 35 + 6 files changed, 2028 insertions(+), 9 deletions(-) create mode 100644 src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.Approve_Public_Api.approved.txt.orig create mode 100644 src/Humanizer/Localisation/TimeToClockNotation/PtBrTimeOnlyToClockNotationConverter.cs diff --git a/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs b/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs index 4758ef650..4f341c3e4 100644 --- a/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs +++ b/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs @@ -25,7 +25,31 @@ public class TimeToClockNotationTests [InlineData(18, 50, "ten to seven")] [InlineData(19, 55, "five to eight")] [InlineData(20, 59, "eight fifty-nine")] - public void ConvertToClockNotationTimeOnlyStringUs(int hours, int minutes, string expectedResult) + public void ConvertToClockNotationTimeOnlyStringEnUs(int hours, int minutes, string expectedResult) + { + var actualResult = new TimeOnly(hours, minutes).ToClockNotation(); + Assert.Equal(expectedResult, actualResult); + } + + [UseCulture("pt-BR")] + [Theory] + [InlineData(00, 00, "meia-noite")] + [InlineData(04, 00, "quatro em ponto")] + [InlineData(05, 01, "cinco e um")] + [InlineData(06, 05, "seis e cinco")] + [InlineData(07, 10, "sete e dez")] + [InlineData(08, 15, "oito e quinze")] + [InlineData(09, 20, "nove e vinte")] + [InlineData(10, 25, "dez e vinte e cinco")] + [InlineData(11, 30, "onze e meia")] + [InlineData(12, 00, "meio-dia")] + [InlineData(15, 35, "três e trinta e cinco")] + [InlineData(16, 40, "vinte para as cinco")] + [InlineData(17, 45, "quinze para as seis")] + [InlineData(18, 50, "dez para as sete")] + [InlineData(19, 55, "cinco para as oito")] + [InlineData(20, 59, "oito e cinquenta e nove")] + public void ConvertToClockNotationTimeOnlyStringPtBr(int hours, int minutes, string expectedResult) { var actualResult = new TimeOnly(hours, minutes).ToClockNotation(); Assert.Equal(expectedResult, actualResult); diff --git a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.Approve_Public_Api.approved.txt.orig b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.Approve_Public_Api.approved.txt.orig new file mode 100644 index 000000000..4a1a9cb3c --- /dev/null +++ b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.Approve_Public_Api.approved.txt.orig @@ -0,0 +1,1955 @@ +[assembly: System.Resources.NeutralResourcesLanguageAttribute("en")] +[assembly: System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName="")] +namespace Humanizer +{ + public class static ByteSizeExtensions + { + public static Humanizer.Bytes.ByteSize Bits(this byte input) { } + public static Humanizer.Bytes.ByteSize Bits(this sbyte input) { } + public static Humanizer.Bytes.ByteSize Bits(this short input) { } + public static Humanizer.Bytes.ByteSize Bits(this ushort input) { } + public static Humanizer.Bytes.ByteSize Bits(this int input) { } + public static Humanizer.Bytes.ByteSize Bits(this uint input) { } + public static Humanizer.Bytes.ByteSize Bits(this long input) { } + public static Humanizer.Bytes.ByteSize Bytes(this byte input) { } + public static Humanizer.Bytes.ByteSize Bytes(this sbyte input) { } + public static Humanizer.Bytes.ByteSize Bytes(this short input) { } + public static Humanizer.Bytes.ByteSize Bytes(this ushort input) { } + public static Humanizer.Bytes.ByteSize Bytes(this int input) { } + public static Humanizer.Bytes.ByteSize Bytes(this uint input) { } + public static Humanizer.Bytes.ByteSize Bytes(this double input) { } + public static Humanizer.Bytes.ByteSize Bytes(this long input) { } + public static Humanizer.Bytes.ByteSize Gigabytes(this byte input) { } + public static Humanizer.Bytes.ByteSize Gigabytes(this sbyte input) { } + public static Humanizer.Bytes.ByteSize Gigabytes(this short input) { } + public static Humanizer.Bytes.ByteSize Gigabytes(this ushort input) { } + public static Humanizer.Bytes.ByteSize Gigabytes(this int input) { } + public static Humanizer.Bytes.ByteSize Gigabytes(this uint input) { } + public static Humanizer.Bytes.ByteSize Gigabytes(this double input) { } + public static Humanizer.Bytes.ByteSize Gigabytes(this long input) { } + public static string Humanize(this Humanizer.Bytes.ByteSize input, string format = null) { } + public static string Humanize(this Humanizer.Bytes.ByteSize input, System.IFormatProvider formatProvider) { } + public static string Humanize(this Humanizer.Bytes.ByteSize input, string format, System.IFormatProvider formatProvider) { } + public static Humanizer.Bytes.ByteSize Kilobytes(this byte input) { } + public static Humanizer.Bytes.ByteSize Kilobytes(this sbyte input) { } + public static Humanizer.Bytes.ByteSize Kilobytes(this short input) { } + public static Humanizer.Bytes.ByteSize Kilobytes(this ushort input) { } + public static Humanizer.Bytes.ByteSize Kilobytes(this int input) { } + public static Humanizer.Bytes.ByteSize Kilobytes(this uint input) { } + public static Humanizer.Bytes.ByteSize Kilobytes(this double input) { } + public static Humanizer.Bytes.ByteSize Kilobytes(this long input) { } + public static Humanizer.Bytes.ByteSize Megabytes(this byte input) { } + public static Humanizer.Bytes.ByteSize Megabytes(this sbyte input) { } + public static Humanizer.Bytes.ByteSize Megabytes(this short input) { } + public static Humanizer.Bytes.ByteSize Megabytes(this ushort input) { } + public static Humanizer.Bytes.ByteSize Megabytes(this int input) { } + public static Humanizer.Bytes.ByteSize Megabytes(this uint input) { } + public static Humanizer.Bytes.ByteSize Megabytes(this double input) { } + public static Humanizer.Bytes.ByteSize Megabytes(this long input) { } + public static Humanizer.Bytes.ByteRate Per(this Humanizer.Bytes.ByteSize size, System.TimeSpan interval) { } + public static Humanizer.Bytes.ByteSize Terabytes(this byte input) { } + public static Humanizer.Bytes.ByteSize Terabytes(this sbyte input) { } + public static Humanizer.Bytes.ByteSize Terabytes(this short input) { } + public static Humanizer.Bytes.ByteSize Terabytes(this ushort input) { } + public static Humanizer.Bytes.ByteSize Terabytes(this int input) { } + public static Humanizer.Bytes.ByteSize Terabytes(this uint input) { } + public static Humanizer.Bytes.ByteSize Terabytes(this double input) { } + public static Humanizer.Bytes.ByteSize Terabytes(this long input) { } + } + public class static CasingExtensions + { + public static string ApplyCase(this string input, Humanizer.LetterCasing casing) { } + } + public class static CollectionHumanizeExtensions + { + public static string Humanize(this System.Collections.Generic.IEnumerable collection) { } + public static string Humanize(this System.Collections.Generic.IEnumerable collection, System.Func displayFormatter) { } + public static string Humanize(this System.Collections.Generic.IEnumerable collection, System.Func displayFormatter) { } + public static string Humanize(this System.Collections.Generic.IEnumerable collection, string separator) { } + public static string Humanize(this System.Collections.Generic.IEnumerable collection, System.Func displayFormatter, string separator) { } + public static string Humanize(this System.Collections.Generic.IEnumerable collection, System.Func displayFormatter, string separator) { } + } + public class static DateHumanizeExtensions + { + public static string Humanize(this System.DateTime input, System.Nullable utcDate = null, System.Nullable dateToCompareAgainst = null, System.Globalization.CultureInfo culture = null) { } + public static string Humanize(this System.Nullable input, System.Nullable utcDate = null, System.Nullable dateToCompareAgainst = null, System.Globalization.CultureInfo culture = null) { } + public static string Humanize(this System.DateTimeOffset input, System.Nullable dateToCompareAgainst = null, System.Globalization.CultureInfo culture = null) { } + public static string Humanize(this System.Nullable input, System.Nullable dateToCompareAgainst = null, System.Globalization.CultureInfo culture = null) { } + public static string Humanize(this System.DateOnly input, System.Nullable dateToCompareAgainst = null, System.Globalization.CultureInfo culture = null) { } + public static string Humanize(this System.Nullable input, System.Nullable dateToCompareAgainst = null, System.Globalization.CultureInfo culture = null) { } + public static string Humanize(this System.TimeOnly input, System.Nullable timeToCompareAgainst = null, bool useUtc = True, System.Globalization.CultureInfo culture = null) { } + public static string Humanize(this System.Nullable input, System.Nullable timeToCompareAgainst = null, bool useUtc = True, System.Globalization.CultureInfo culture = null) { } + } + public class static DateToOrdinalWordsExtensions + { + public static string ToOrdinalWords(this System.DateTime input) { } + public static string ToOrdinalWords(this System.DateTime input, Humanizer.GrammaticalCase grammaticalCase) { } + public static string ToOrdinalWords(this System.DateOnly input) { } + public static string ToOrdinalWords(this System.DateOnly input, Humanizer.GrammaticalCase grammaticalCase) { } + } + public class static EnglishArticle + { + public static string[] AppendArticlePrefix(string[] items) { } + public static string[] PrependArticleSuffix(string[] appended) { } + } + public enum EnglishArticles + { + A = 0, + An = 1, + The = 2, + } + public class static EnumDehumanizeExtensions + { + public static TTargetEnum DehumanizeTo(this string input) + where TTargetEnum : struct, System.IComparable, System.IFormattable { } + public static System.Enum DehumanizeTo(this string input, System.Type targetEnum, Humanizer.OnNoMatch onNoMatch = 0) { } + } + public class static EnumHumanizeExtensions + { + public static string Humanize(this System.Enum input) { } + public static string Humanize(this System.Enum input, Humanizer.LetterCasing casing) { } + } + public enum GrammaticalCase + { + Nominative = 0, + Genitive = 1, + Dative = 2, + Accusative = 3, + Instrumental = 4, + Prepositional = 5, + } + public enum GrammaticalGender + { + Masculine = 0, + Feminine = 1, + Neuter = 2, + } + public class static HeadingExtensions + { + public static double FromAbbreviatedHeading(this string heading) { } + public static double FromAbbreviatedHeading(this string heading, System.Globalization.CultureInfo culture = null) { } + public static double FromHeadingArrow(this char heading) { } + public static double FromHeadingArrow(this string heading) { } + public static string ToHeading(this double heading, Humanizer.HeadingStyle style = 0, System.Globalization.CultureInfo culture = null) { } + public static char ToHeadingArrow(this double heading) { } + } + public enum HeadingStyle + { + Abbreviated = 0, + Full = 1, + } + public interface ICulturedStringTransformer : Humanizer.IStringTransformer + { + string Transform(string input, System.Globalization.CultureInfo culture); + } + public interface IStringTransformer + { + string Transform(string input); + } + public interface ITruncator + { + string Truncate(string value, int length, string truncationString, Humanizer.TruncateFrom truncateFrom = 1); + } + public class In + { + public In() { } + public static System.DateTime April { get; } + public static System.DateTime August { get; } + public static System.DateTime December { get; } + public static System.DateTime February { get; } + public static System.DateTime January { get; } + public static System.DateTime July { get; } + public static System.DateTime June { get; } + public static System.DateTime March { get; } + public static System.DateTime May { get; } + public static System.DateTime November { get; } + public static System.DateTime October { get; } + public static System.DateTime September { get; } + public static System.DateTime AprilOf(int year) { } + public static System.DateTime AugustOf(int year) { } + public static System.DateTime DecemberOf(int year) { } + public static System.DateTime FebruaryOf(int year) { } + public static System.DateTime JanuaryOf(int year) { } + public static System.DateTime JulyOf(int year) { } + public static System.DateTime JuneOf(int year) { } + public static System.DateTime MarchOf(int year) { } + public static System.DateTime MayOf(int year) { } + public static System.DateTime NovemberOf(int year) { } + public static System.DateTime OctoberOf(int year) { } + public static System.DateTime SeptemberOf(int year) { } + public static System.DateTime TheYear(int year) { } + public class static Eight + { + public static System.DateTime Days { get; } + public static System.DateTime Hours { get; } + public static System.DateTime Minutes { get; } + public static System.DateTime Months { get; } + public static System.DateTime Seconds { get; } + public static System.DateTime Weeks { get; } + public static System.DateTime Years { get; } + public static System.DateTime DaysFrom(System.DateTime date) { } + public static System.DateTime HoursFrom(System.DateTime date) { } + public static System.DateTime MinutesFrom(System.DateTime date) { } + public static System.DateTime MonthsFrom(System.DateTime date) { } + public static System.DateTime SecondsFrom(System.DateTime date) { } + public static System.DateTime WeeksFrom(System.DateTime date) { } + public static System.DateTime YearsFrom(System.DateTime date) { } + } + public class static Five + { + public static System.DateTime Days { get; } + public static System.DateTime Hours { get; } + public static System.DateTime Minutes { get; } + public static System.DateTime Months { get; } + public static System.DateTime Seconds { get; } + public static System.DateTime Weeks { get; } + public static System.DateTime Years { get; } + public static System.DateTime DaysFrom(System.DateTime date) { } + public static System.DateTime HoursFrom(System.DateTime date) { } + public static System.DateTime MinutesFrom(System.DateTime date) { } + public static System.DateTime MonthsFrom(System.DateTime date) { } + public static System.DateTime SecondsFrom(System.DateTime date) { } + public static System.DateTime WeeksFrom(System.DateTime date) { } + public static System.DateTime YearsFrom(System.DateTime date) { } + } + public class static Four + { + public static System.DateTime Days { get; } + public static System.DateTime Hours { get; } + public static System.DateTime Minutes { get; } + public static System.DateTime Months { get; } + public static System.DateTime Seconds { get; } + public static System.DateTime Weeks { get; } + public static System.DateTime Years { get; } + public static System.DateTime DaysFrom(System.DateTime date) { } + public static System.DateTime HoursFrom(System.DateTime date) { } + public static System.DateTime MinutesFrom(System.DateTime date) { } + public static System.DateTime MonthsFrom(System.DateTime date) { } + public static System.DateTime SecondsFrom(System.DateTime date) { } + public static System.DateTime WeeksFrom(System.DateTime date) { } + public static System.DateTime YearsFrom(System.DateTime date) { } + } + public class static Nine + { + public static System.DateTime Days { get; } + public static System.DateTime Hours { get; } + public static System.DateTime Minutes { get; } + public static System.DateTime Months { get; } + public static System.DateTime Seconds { get; } + public static System.DateTime Weeks { get; } + public static System.DateTime Years { get; } + public static System.DateTime DaysFrom(System.DateTime date) { } + public static System.DateTime HoursFrom(System.DateTime date) { } + public static System.DateTime MinutesFrom(System.DateTime date) { } + public static System.DateTime MonthsFrom(System.DateTime date) { } + public static System.DateTime SecondsFrom(System.DateTime date) { } + public static System.DateTime WeeksFrom(System.DateTime date) { } + public static System.DateTime YearsFrom(System.DateTime date) { } + } + public class static One + { + public static System.DateTime Day { get; } + public static System.DateTime Hour { get; } + public static System.DateTime Minute { get; } + public static System.DateTime Month { get; } + public static System.DateTime Second { get; } + public static System.DateTime Week { get; } + public static System.DateTime Year { get; } + public static System.DateTime DayFrom(System.DateTime date) { } + public static System.DateTime HourFrom(System.DateTime date) { } + public static System.DateTime MinuteFrom(System.DateTime date) { } + public static System.DateTime MonthFrom(System.DateTime date) { } + public static System.DateTime SecondFrom(System.DateTime date) { } + public static System.DateTime WeekFrom(System.DateTime date) { } + public static System.DateTime YearFrom(System.DateTime date) { } + } + public class static Seven + { + public static System.DateTime Days { get; } + public static System.DateTime Hours { get; } + public static System.DateTime Minutes { get; } + public static System.DateTime Months { get; } + public static System.DateTime Seconds { get; } + public static System.DateTime Weeks { get; } + public static System.DateTime Years { get; } + public static System.DateTime DaysFrom(System.DateTime date) { } + public static System.DateTime HoursFrom(System.DateTime date) { } + public static System.DateTime MinutesFrom(System.DateTime date) { } + public static System.DateTime MonthsFrom(System.DateTime date) { } + public static System.DateTime SecondsFrom(System.DateTime date) { } + public static System.DateTime WeeksFrom(System.DateTime date) { } + public static System.DateTime YearsFrom(System.DateTime date) { } + } + public class static Six + { + public static System.DateTime Days { get; } + public static System.DateTime Hours { get; } + public static System.DateTime Minutes { get; } + public static System.DateTime Months { get; } + public static System.DateTime Seconds { get; } + public static System.DateTime Weeks { get; } + public static System.DateTime Years { get; } + public static System.DateTime DaysFrom(System.DateTime date) { } + public static System.DateTime HoursFrom(System.DateTime date) { } + public static System.DateTime MinutesFrom(System.DateTime date) { } + public static System.DateTime MonthsFrom(System.DateTime date) { } + public static System.DateTime SecondsFrom(System.DateTime date) { } + public static System.DateTime WeeksFrom(System.DateTime date) { } + public static System.DateTime YearsFrom(System.DateTime date) { } + } + public class static Ten + { + public static System.DateTime Days { get; } + public static System.DateTime Hours { get; } + public static System.DateTime Minutes { get; } + public static System.DateTime Months { get; } + public static System.DateTime Seconds { get; } + public static System.DateTime Weeks { get; } + public static System.DateTime Years { get; } + public static System.DateTime DaysFrom(System.DateTime date) { } + public static System.DateTime HoursFrom(System.DateTime date) { } + public static System.DateTime MinutesFrom(System.DateTime date) { } + public static System.DateTime MonthsFrom(System.DateTime date) { } + public static System.DateTime SecondsFrom(System.DateTime date) { } + public static System.DateTime WeeksFrom(System.DateTime date) { } + public static System.DateTime YearsFrom(System.DateTime date) { } + } + public class static Three + { + public static System.DateTime Days { get; } + public static System.DateTime Hours { get; } + public static System.DateTime Minutes { get; } + public static System.DateTime Months { get; } + public static System.DateTime Seconds { get; } + public static System.DateTime Weeks { get; } + public static System.DateTime Years { get; } + public static System.DateTime DaysFrom(System.DateTime date) { } + public static System.DateTime HoursFrom(System.DateTime date) { } + public static System.DateTime MinutesFrom(System.DateTime date) { } + public static System.DateTime MonthsFrom(System.DateTime date) { } + public static System.DateTime SecondsFrom(System.DateTime date) { } + public static System.DateTime WeeksFrom(System.DateTime date) { } + public static System.DateTime YearsFrom(System.DateTime date) { } + } + public class static Two + { + public static System.DateTime Days { get; } + public static System.DateTime Hours { get; } + public static System.DateTime Minutes { get; } + public static System.DateTime Months { get; } + public static System.DateTime Seconds { get; } + public static System.DateTime Weeks { get; } + public static System.DateTime Years { get; } + public static System.DateTime DaysFrom(System.DateTime date) { } + public static System.DateTime HoursFrom(System.DateTime date) { } + public static System.DateTime MinutesFrom(System.DateTime date) { } + public static System.DateTime MonthsFrom(System.DateTime date) { } + public static System.DateTime SecondsFrom(System.DateTime date) { } + public static System.DateTime WeeksFrom(System.DateTime date) { } + public static System.DateTime YearsFrom(System.DateTime date) { } + } + } + public class InDate + { + public InDate() { } + public static System.DateOnly April { get; } + public static System.DateOnly August { get; } + public static System.DateOnly December { get; } + public static System.DateOnly February { get; } + public static System.DateOnly January { get; } + public static System.DateOnly July { get; } + public static System.DateOnly June { get; } + public static System.DateOnly March { get; } + public static System.DateOnly May { get; } + public static System.DateOnly November { get; } + public static System.DateOnly October { get; } + public static System.DateOnly September { get; } + public static System.DateOnly AprilOf(int year) { } + public static System.DateOnly AugustOf(int year) { } + public static System.DateOnly DecemberOf(int year) { } + public static System.DateOnly FebruaryOf(int year) { } + public static System.DateOnly JanuaryOf(int year) { } + public static System.DateOnly JulyOf(int year) { } + public static System.DateOnly JuneOf(int year) { } + public static System.DateOnly MarchOf(int year) { } + public static System.DateOnly MayOf(int year) { } + public static System.DateOnly NovemberOf(int year) { } + public static System.DateOnly OctoberOf(int year) { } + public static System.DateOnly SeptemberOf(int year) { } + public static System.DateOnly TheYear(int year) { } + public class static Eight + { + public static System.DateOnly Days { get; } + public static System.DateOnly Months { get; } + public static System.DateOnly Weeks { get; } + public static System.DateOnly Years { get; } + public static System.DateOnly DaysFrom(System.DateOnly date) { } + public static System.DateOnly DaysFrom(System.DateTime date) { } + public static System.DateOnly MonthsFrom(System.DateOnly date) { } + public static System.DateOnly MonthsFrom(System.DateTime date) { } + public static System.DateOnly WeeksFrom(System.DateOnly date) { } + public static System.DateOnly WeeksFrom(System.DateTime date) { } + public static System.DateOnly YearsFrom(System.DateOnly date) { } + public static System.DateOnly YearsFrom(System.DateTime date) { } + } + public class static Five + { + public static System.DateOnly Days { get; } + public static System.DateOnly Months { get; } + public static System.DateOnly Weeks { get; } + public static System.DateOnly Years { get; } + public static System.DateOnly DaysFrom(System.DateOnly date) { } + public static System.DateOnly DaysFrom(System.DateTime date) { } + public static System.DateOnly MonthsFrom(System.DateOnly date) { } + public static System.DateOnly MonthsFrom(System.DateTime date) { } + public static System.DateOnly WeeksFrom(System.DateOnly date) { } + public static System.DateOnly WeeksFrom(System.DateTime date) { } + public static System.DateOnly YearsFrom(System.DateOnly date) { } + public static System.DateOnly YearsFrom(System.DateTime date) { } + } + public class static Four + { + public static System.DateOnly Days { get; } + public static System.DateOnly Months { get; } + public static System.DateOnly Weeks { get; } + public static System.DateOnly Years { get; } + public static System.DateOnly DaysFrom(System.DateOnly date) { } + public static System.DateOnly DaysFrom(System.DateTime date) { } + public static System.DateOnly MonthsFrom(System.DateOnly date) { } + public static System.DateOnly MonthsFrom(System.DateTime date) { } + public static System.DateOnly WeeksFrom(System.DateOnly date) { } + public static System.DateOnly WeeksFrom(System.DateTime date) { } + public static System.DateOnly YearsFrom(System.DateOnly date) { } + public static System.DateOnly YearsFrom(System.DateTime date) { } + } + public class static Nine + { + public static System.DateOnly Days { get; } + public static System.DateOnly Months { get; } + public static System.DateOnly Weeks { get; } + public static System.DateOnly Years { get; } + public static System.DateOnly DaysFrom(System.DateOnly date) { } + public static System.DateOnly DaysFrom(System.DateTime date) { } + public static System.DateOnly MonthsFrom(System.DateOnly date) { } + public static System.DateOnly MonthsFrom(System.DateTime date) { } + public static System.DateOnly WeeksFrom(System.DateOnly date) { } + public static System.DateOnly WeeksFrom(System.DateTime date) { } + public static System.DateOnly YearsFrom(System.DateOnly date) { } + public static System.DateOnly YearsFrom(System.DateTime date) { } + } + public class static One + { + public static System.DateOnly Day { get; } + public static System.DateOnly Month { get; } + public static System.DateOnly Week { get; } + public static System.DateOnly Year { get; } + public static System.DateOnly DayFrom(System.DateOnly date) { } + public static System.DateOnly DayFrom(System.DateTime date) { } + public static System.DateOnly MonthFrom(System.DateOnly date) { } + public static System.DateOnly MonthFrom(System.DateTime date) { } + public static System.DateOnly WeekFrom(System.DateOnly date) { } + public static System.DateOnly WeekFrom(System.DateTime date) { } + public static System.DateOnly YearFrom(System.DateOnly date) { } + public static System.DateOnly YearFrom(System.DateTime date) { } + } + public class static Seven + { + public static System.DateOnly Days { get; } + public static System.DateOnly Months { get; } + public static System.DateOnly Weeks { get; } + public static System.DateOnly Years { get; } + public static System.DateOnly DaysFrom(System.DateOnly date) { } + public static System.DateOnly DaysFrom(System.DateTime date) { } + public static System.DateOnly MonthsFrom(System.DateOnly date) { } + public static System.DateOnly MonthsFrom(System.DateTime date) { } + public static System.DateOnly WeeksFrom(System.DateOnly date) { } + public static System.DateOnly WeeksFrom(System.DateTime date) { } + public static System.DateOnly YearsFrom(System.DateOnly date) { } + public static System.DateOnly YearsFrom(System.DateTime date) { } + } + public class static Six + { + public static System.DateOnly Days { get; } + public static System.DateOnly Months { get; } + public static System.DateOnly Weeks { get; } + public static System.DateOnly Years { get; } + public static System.DateOnly DaysFrom(System.DateOnly date) { } + public static System.DateOnly DaysFrom(System.DateTime date) { } + public static System.DateOnly MonthsFrom(System.DateOnly date) { } + public static System.DateOnly MonthsFrom(System.DateTime date) { } + public static System.DateOnly WeeksFrom(System.DateOnly date) { } + public static System.DateOnly WeeksFrom(System.DateTime date) { } + public static System.DateOnly YearsFrom(System.DateOnly date) { } + public static System.DateOnly YearsFrom(System.DateTime date) { } + } + public class static Ten + { + public static System.DateOnly Days { get; } + public static System.DateOnly Months { get; } + public static System.DateOnly Weeks { get; } + public static System.DateOnly Years { get; } + public static System.DateOnly DaysFrom(System.DateOnly date) { } + public static System.DateOnly DaysFrom(System.DateTime date) { } + public static System.DateOnly MonthsFrom(System.DateOnly date) { } + public static System.DateOnly MonthsFrom(System.DateTime date) { } + public static System.DateOnly WeeksFrom(System.DateOnly date) { } + public static System.DateOnly WeeksFrom(System.DateTime date) { } + public static System.DateOnly YearsFrom(System.DateOnly date) { } + public static System.DateOnly YearsFrom(System.DateTime date) { } + } + public class static Three + { + public static System.DateOnly Days { get; } + public static System.DateOnly Months { get; } + public static System.DateOnly Weeks { get; } + public static System.DateOnly Years { get; } + public static System.DateOnly DaysFrom(System.DateOnly date) { } + public static System.DateOnly DaysFrom(System.DateTime date) { } + public static System.DateOnly MonthsFrom(System.DateOnly date) { } + public static System.DateOnly MonthsFrom(System.DateTime date) { } + public static System.DateOnly WeeksFrom(System.DateOnly date) { } + public static System.DateOnly WeeksFrom(System.DateTime date) { } + public static System.DateOnly YearsFrom(System.DateOnly date) { } + public static System.DateOnly YearsFrom(System.DateTime date) { } + } + public class static Two + { + public static System.DateOnly Days { get; } + public static System.DateOnly Months { get; } + public static System.DateOnly Weeks { get; } + public static System.DateOnly Years { get; } + public static System.DateOnly DaysFrom(System.DateOnly date) { } + public static System.DateOnly DaysFrom(System.DateTime date) { } + public static System.DateOnly MonthsFrom(System.DateOnly date) { } + public static System.DateOnly MonthsFrom(System.DateTime date) { } + public static System.DateOnly WeeksFrom(System.DateOnly date) { } + public static System.DateOnly WeeksFrom(System.DateTime date) { } + public static System.DateOnly YearsFrom(System.DateOnly date) { } + public static System.DateOnly YearsFrom(System.DateTime date) { } + } + } + public class static InflectorExtensions + { + public static string Camelize(this string input) { } + public static string Dasherize(this string underscoredWord) { } + public static string Hyphenate(this string underscoredWord) { } + public static string Kebaberize(this string input) { } + public static string Pascalize(this string input) { } + public static string Pluralize(this string word, bool inputIsKnownToBeSingular = True) { } + public static string Singularize(this string word, bool inputIsKnownToBePlural = True, bool skipSimpleWords = False) { } + public static string Titleize(this string input) { } + public static string Underscore(this string input) { } + } + public enum LetterCasing + { + Title = 0, + AllCaps = 1, + LowerCase = 2, + Sentence = 3, + } + public class static MetricNumeralExtensions + { + public static double FromMetric(this string input) { } + [System.ObsoleteAttribute("Please use overload with MetricNumeralFormats")] + public static string ToMetric(this int input, bool hasSpace, bool useSymbol = True, System.Nullable decimals = null) { } + public static string ToMetric(this int input, System.Nullable formats = null, System.Nullable decimals = null) { } + [System.ObsoleteAttribute("Please use overload with MetricNumeralFormats")] + public static string ToMetric(this double input, bool hasSpace, bool useSymbol = True, System.Nullable decimals = null) { } + public static string ToMetric(this double input, System.Nullable formats = null, System.Nullable decimals = null) { } + } + [System.FlagsAttribute()] + public enum MetricNumeralFormats + { + UseLongScaleWord = 1, + UseName = 2, + UseShortScaleWord = 4, + WithSpace = 8, + } + public class NoMatchFoundException : System.Exception + { + public NoMatchFoundException() { } + public NoMatchFoundException(string message) { } + public NoMatchFoundException(string message, System.Exception inner) { } + } + public class static NumberToNumberExtensions + { + public static int Billions(this int input) { } + public static uint Billions(this uint input) { } + public static long Billions(this long input) { } + public static ulong Billions(this ulong input) { } + public static double Billions(this double input) { } + public static int Hundreds(this int input) { } + public static uint Hundreds(this uint input) { } + public static long Hundreds(this long input) { } + public static ulong Hundreds(this ulong input) { } + public static double Hundreds(this double input) { } + public static int Millions(this int input) { } + public static uint Millions(this uint input) { } + public static long Millions(this long input) { } + public static ulong Millions(this ulong input) { } + public static double Millions(this double input) { } + public static int Tens(this int input) { } + public static uint Tens(this uint input) { } + public static long Tens(this long input) { } + public static ulong Tens(this ulong input) { } + public static double Tens(this double input) { } + public static int Thousands(this int input) { } + public static uint Thousands(this uint input) { } + public static long Thousands(this long input) { } + public static ulong Thousands(this ulong input) { } + public static double Thousands(this double input) { } + } + public class static NumberToTimeSpanExtensions + { + public static System.TimeSpan Days(this byte days) { } + public static System.TimeSpan Days(this sbyte days) { } + public static System.TimeSpan Days(this short days) { } + public static System.TimeSpan Days(this ushort days) { } + public static System.TimeSpan Days(this int days) { } + public static System.TimeSpan Days(this uint days) { } + public static System.TimeSpan Days(this long days) { } + public static System.TimeSpan Days(this ulong days) { } + public static System.TimeSpan Days(this double days) { } + public static System.TimeSpan Hours(this byte hours) { } + public static System.TimeSpan Hours(this sbyte hours) { } + public static System.TimeSpan Hours(this short hours) { } + public static System.TimeSpan Hours(this ushort hours) { } + public static System.TimeSpan Hours(this int hours) { } + public static System.TimeSpan Hours(this uint hours) { } + public static System.TimeSpan Hours(this long hours) { } + public static System.TimeSpan Hours(this ulong hours) { } + public static System.TimeSpan Hours(this double hours) { } + public static System.TimeSpan Milliseconds(this byte ms) { } + public static System.TimeSpan Milliseconds(this sbyte ms) { } + public static System.TimeSpan Milliseconds(this short ms) { } + public static System.TimeSpan Milliseconds(this ushort ms) { } + public static System.TimeSpan Milliseconds(this int ms) { } + public static System.TimeSpan Milliseconds(this uint ms) { } + public static System.TimeSpan Milliseconds(this long ms) { } + public static System.TimeSpan Milliseconds(this ulong ms) { } + public static System.TimeSpan Milliseconds(this double ms) { } + public static System.TimeSpan Minutes(this byte minutes) { } + public static System.TimeSpan Minutes(this sbyte minutes) { } + public static System.TimeSpan Minutes(this short minutes) { } + public static System.TimeSpan Minutes(this ushort minutes) { } + public static System.TimeSpan Minutes(this int minutes) { } + public static System.TimeSpan Minutes(this uint minutes) { } + public static System.TimeSpan Minutes(this long minutes) { } + public static System.TimeSpan Minutes(this ulong minutes) { } + public static System.TimeSpan Minutes(this double minutes) { } + public static System.TimeSpan Seconds(this byte seconds) { } + public static System.TimeSpan Seconds(this sbyte seconds) { } + public static System.TimeSpan Seconds(this short seconds) { } + public static System.TimeSpan Seconds(this ushort seconds) { } + public static System.TimeSpan Seconds(this int seconds) { } + public static System.TimeSpan Seconds(this uint seconds) { } + public static System.TimeSpan Seconds(this long seconds) { } + public static System.TimeSpan Seconds(this ulong seconds) { } + public static System.TimeSpan Seconds(this double seconds) { } + public static System.TimeSpan Weeks(this byte input) { } + public static System.TimeSpan Weeks(this sbyte input) { } + public static System.TimeSpan Weeks(this short input) { } + public static System.TimeSpan Weeks(this ushort input) { } + public static System.TimeSpan Weeks(this int input) { } + public static System.TimeSpan Weeks(this uint input) { } + public static System.TimeSpan Weeks(this long input) { } + public static System.TimeSpan Weeks(this ulong input) { } + public static System.TimeSpan Weeks(this double input) { } + } + public class static NumberToWordsExtension + { + public static string ToOrdinalWords(this int number, System.Globalization.CultureInfo culture = null) { } + public static string ToOrdinalWords(this int number, Humanizer.GrammaticalGender gender, System.Globalization.CultureInfo culture = null) { } + public static string ToTuple(this int number, System.Globalization.CultureInfo culture = null) { } + public static string ToWords(this int number, System.Globalization.CultureInfo culture = null) { } + public static string ToWords(this int number, bool addAnd, System.Globalization.CultureInfo culture = null) { } + public static string ToWords(this int number, Humanizer.GrammaticalGender gender, System.Globalization.CultureInfo culture = null) { } + public static string ToWords(this long number, System.Globalization.CultureInfo culture = null, bool addAnd = True) { } + public static string ToWords(this long number, Humanizer.GrammaticalGender gender, System.Globalization.CultureInfo culture = null) { } + } + public class On + { + public On() { } + public class April + { + public April() { } + public static System.DateTime The10th { get; } + public static System.DateTime The11th { get; } + public static System.DateTime The12th { get; } + public static System.DateTime The13th { get; } + public static System.DateTime The14th { get; } + public static System.DateTime The15th { get; } + public static System.DateTime The16th { get; } + public static System.DateTime The17th { get; } + public static System.DateTime The18th { get; } + public static System.DateTime The19th { get; } + public static System.DateTime The1st { get; } + public static System.DateTime The20th { get; } + public static System.DateTime The21st { get; } + public static System.DateTime The22nd { get; } + public static System.DateTime The23rd { get; } + public static System.DateTime The24th { get; } + public static System.DateTime The25th { get; } + public static System.DateTime The26th { get; } + public static System.DateTime The27th { get; } + public static System.DateTime The28th { get; } + public static System.DateTime The29th { get; } + public static System.DateTime The2nd { get; } + public static System.DateTime The30th { get; } + public static System.DateTime The3rd { get; } + public static System.DateTime The4th { get; } + public static System.DateTime The5th { get; } + public static System.DateTime The6th { get; } + public static System.DateTime The7th { get; } + public static System.DateTime The8th { get; } + public static System.DateTime The9th { get; } + public static System.DateTime The(int dayNumber) { } + } + public class August + { + public August() { } + public static System.DateTime The10th { get; } + public static System.DateTime The11th { get; } + public static System.DateTime The12th { get; } + public static System.DateTime The13th { get; } + public static System.DateTime The14th { get; } + public static System.DateTime The15th { get; } + public static System.DateTime The16th { get; } + public static System.DateTime The17th { get; } + public static System.DateTime The18th { get; } + public static System.DateTime The19th { get; } + public static System.DateTime The1st { get; } + public static System.DateTime The20th { get; } + public static System.DateTime The21st { get; } + public static System.DateTime The22nd { get; } + public static System.DateTime The23rd { get; } + public static System.DateTime The24th { get; } + public static System.DateTime The25th { get; } + public static System.DateTime The26th { get; } + public static System.DateTime The27th { get; } + public static System.DateTime The28th { get; } + public static System.DateTime The29th { get; } + public static System.DateTime The2nd { get; } + public static System.DateTime The30th { get; } + public static System.DateTime The31st { get; } + public static System.DateTime The3rd { get; } + public static System.DateTime The4th { get; } + public static System.DateTime The5th { get; } + public static System.DateTime The6th { get; } + public static System.DateTime The7th { get; } + public static System.DateTime The8th { get; } + public static System.DateTime The9th { get; } + public static System.DateTime The(int dayNumber) { } + } + public class December + { + public December() { } + public static System.DateTime The10th { get; } + public static System.DateTime The11th { get; } + public static System.DateTime The12th { get; } + public static System.DateTime The13th { get; } + public static System.DateTime The14th { get; } + public static System.DateTime The15th { get; } + public static System.DateTime The16th { get; } + public static System.DateTime The17th { get; } + public static System.DateTime The18th { get; } + public static System.DateTime The19th { get; } + public static System.DateTime The1st { get; } + public static System.DateTime The20th { get; } + public static System.DateTime The21st { get; } + public static System.DateTime The22nd { get; } + public static System.DateTime The23rd { get; } + public static System.DateTime The24th { get; } + public static System.DateTime The25th { get; } + public static System.DateTime The26th { get; } + public static System.DateTime The27th { get; } + public static System.DateTime The28th { get; } + public static System.DateTime The29th { get; } + public static System.DateTime The2nd { get; } + public static System.DateTime The30th { get; } + public static System.DateTime The31st { get; } + public static System.DateTime The3rd { get; } + public static System.DateTime The4th { get; } + public static System.DateTime The5th { get; } + public static System.DateTime The6th { get; } + public static System.DateTime The7th { get; } + public static System.DateTime The8th { get; } + public static System.DateTime The9th { get; } + public static System.DateTime The(int dayNumber) { } + } + public class February + { + public February() { } + public static System.DateTime The10th { get; } + public static System.DateTime The11th { get; } + public static System.DateTime The12th { get; } + public static System.DateTime The13th { get; } + public static System.DateTime The14th { get; } + public static System.DateTime The15th { get; } + public static System.DateTime The16th { get; } + public static System.DateTime The17th { get; } + public static System.DateTime The18th { get; } + public static System.DateTime The19th { get; } + public static System.DateTime The1st { get; } + public static System.DateTime The20th { get; } + public static System.DateTime The21st { get; } + public static System.DateTime The22nd { get; } + public static System.DateTime The23rd { get; } + public static System.DateTime The24th { get; } + public static System.DateTime The25th { get; } + public static System.DateTime The26th { get; } + public static System.DateTime The27th { get; } + public static System.DateTime The28th { get; } + public static System.DateTime The29th { get; } + public static System.DateTime The2nd { get; } + public static System.DateTime The3rd { get; } + public static System.DateTime The4th { get; } + public static System.DateTime The5th { get; } + public static System.DateTime The6th { get; } + public static System.DateTime The7th { get; } + public static System.DateTime The8th { get; } + public static System.DateTime The9th { get; } + public static System.DateTime The(int dayNumber) { } + } + public class January + { + public January() { } + public static System.DateTime The10th { get; } + public static System.DateTime The11th { get; } + public static System.DateTime The12th { get; } + public static System.DateTime The13th { get; } + public static System.DateTime The14th { get; } + public static System.DateTime The15th { get; } + public static System.DateTime The16th { get; } + public static System.DateTime The17th { get; } + public static System.DateTime The18th { get; } + public static System.DateTime The19th { get; } + public static System.DateTime The1st { get; } + public static System.DateTime The20th { get; } + public static System.DateTime The21st { get; } + public static System.DateTime The22nd { get; } + public static System.DateTime The23rd { get; } + public static System.DateTime The24th { get; } + public static System.DateTime The25th { get; } + public static System.DateTime The26th { get; } + public static System.DateTime The27th { get; } + public static System.DateTime The28th { get; } + public static System.DateTime The29th { get; } + public static System.DateTime The2nd { get; } + public static System.DateTime The30th { get; } + public static System.DateTime The31st { get; } + public static System.DateTime The3rd { get; } + public static System.DateTime The4th { get; } + public static System.DateTime The5th { get; } + public static System.DateTime The6th { get; } + public static System.DateTime The7th { get; } + public static System.DateTime The8th { get; } + public static System.DateTime The9th { get; } + public static System.DateTime The(int dayNumber) { } + } + public class July + { + public July() { } + public static System.DateTime The10th { get; } + public static System.DateTime The11th { get; } + public static System.DateTime The12th { get; } + public static System.DateTime The13th { get; } + public static System.DateTime The14th { get; } + public static System.DateTime The15th { get; } + public static System.DateTime The16th { get; } + public static System.DateTime The17th { get; } + public static System.DateTime The18th { get; } + public static System.DateTime The19th { get; } + public static System.DateTime The1st { get; } + public static System.DateTime The20th { get; } + public static System.DateTime The21st { get; } + public static System.DateTime The22nd { get; } + public static System.DateTime The23rd { get; } + public static System.DateTime The24th { get; } + public static System.DateTime The25th { get; } + public static System.DateTime The26th { get; } + public static System.DateTime The27th { get; } + public static System.DateTime The28th { get; } + public static System.DateTime The29th { get; } + public static System.DateTime The2nd { get; } + public static System.DateTime The30th { get; } + public static System.DateTime The31st { get; } + public static System.DateTime The3rd { get; } + public static System.DateTime The4th { get; } + public static System.DateTime The5th { get; } + public static System.DateTime The6th { get; } + public static System.DateTime The7th { get; } + public static System.DateTime The8th { get; } + public static System.DateTime The9th { get; } + public static System.DateTime The(int dayNumber) { } + } + public class June + { + public June() { } + public static System.DateTime The10th { get; } + public static System.DateTime The11th { get; } + public static System.DateTime The12th { get; } + public static System.DateTime The13th { get; } + public static System.DateTime The14th { get; } + public static System.DateTime The15th { get; } + public static System.DateTime The16th { get; } + public static System.DateTime The17th { get; } + public static System.DateTime The18th { get; } + public static System.DateTime The19th { get; } + public static System.DateTime The1st { get; } + public static System.DateTime The20th { get; } + public static System.DateTime The21st { get; } + public static System.DateTime The22nd { get; } + public static System.DateTime The23rd { get; } + public static System.DateTime The24th { get; } + public static System.DateTime The25th { get; } + public static System.DateTime The26th { get; } + public static System.DateTime The27th { get; } + public static System.DateTime The28th { get; } + public static System.DateTime The29th { get; } + public static System.DateTime The2nd { get; } + public static System.DateTime The30th { get; } + public static System.DateTime The3rd { get; } + public static System.DateTime The4th { get; } + public static System.DateTime The5th { get; } + public static System.DateTime The6th { get; } + public static System.DateTime The7th { get; } + public static System.DateTime The8th { get; } + public static System.DateTime The9th { get; } + public static System.DateTime The(int dayNumber) { } + } + public class March + { + public March() { } + public static System.DateTime The10th { get; } + public static System.DateTime The11th { get; } + public static System.DateTime The12th { get; } + public static System.DateTime The13th { get; } + public static System.DateTime The14th { get; } + public static System.DateTime The15th { get; } + public static System.DateTime The16th { get; } + public static System.DateTime The17th { get; } + public static System.DateTime The18th { get; } + public static System.DateTime The19th { get; } + public static System.DateTime The1st { get; } + public static System.DateTime The20th { get; } + public static System.DateTime The21st { get; } + public static System.DateTime The22nd { get; } + public static System.DateTime The23rd { get; } + public static System.DateTime The24th { get; } + public static System.DateTime The25th { get; } + public static System.DateTime The26th { get; } + public static System.DateTime The27th { get; } + public static System.DateTime The28th { get; } + public static System.DateTime The29th { get; } + public static System.DateTime The2nd { get; } + public static System.DateTime The30th { get; } + public static System.DateTime The31st { get; } + public static System.DateTime The3rd { get; } + public static System.DateTime The4th { get; } + public static System.DateTime The5th { get; } + public static System.DateTime The6th { get; } + public static System.DateTime The7th { get; } + public static System.DateTime The8th { get; } + public static System.DateTime The9th { get; } + public static System.DateTime The(int dayNumber) { } + } + public class May + { + public May() { } + public static System.DateTime The10th { get; } + public static System.DateTime The11th { get; } + public static System.DateTime The12th { get; } + public static System.DateTime The13th { get; } + public static System.DateTime The14th { get; } + public static System.DateTime The15th { get; } + public static System.DateTime The16th { get; } + public static System.DateTime The17th { get; } + public static System.DateTime The18th { get; } + public static System.DateTime The19th { get; } + public static System.DateTime The1st { get; } + public static System.DateTime The20th { get; } + public static System.DateTime The21st { get; } + public static System.DateTime The22nd { get; } + public static System.DateTime The23rd { get; } + public static System.DateTime The24th { get; } + public static System.DateTime The25th { get; } + public static System.DateTime The26th { get; } + public static System.DateTime The27th { get; } + public static System.DateTime The28th { get; } + public static System.DateTime The29th { get; } + public static System.DateTime The2nd { get; } + public static System.DateTime The30th { get; } + public static System.DateTime The31st { get; } + public static System.DateTime The3rd { get; } + public static System.DateTime The4th { get; } + public static System.DateTime The5th { get; } + public static System.DateTime The6th { get; } + public static System.DateTime The7th { get; } + public static System.DateTime The8th { get; } + public static System.DateTime The9th { get; } + public static System.DateTime The(int dayNumber) { } + } + public class November + { + public November() { } + public static System.DateTime The10th { get; } + public static System.DateTime The11th { get; } + public static System.DateTime The12th { get; } + public static System.DateTime The13th { get; } + public static System.DateTime The14th { get; } + public static System.DateTime The15th { get; } + public static System.DateTime The16th { get; } + public static System.DateTime The17th { get; } + public static System.DateTime The18th { get; } + public static System.DateTime The19th { get; } + public static System.DateTime The1st { get; } + public static System.DateTime The20th { get; } + public static System.DateTime The21st { get; } + public static System.DateTime The22nd { get; } + public static System.DateTime The23rd { get; } + public static System.DateTime The24th { get; } + public static System.DateTime The25th { get; } + public static System.DateTime The26th { get; } + public static System.DateTime The27th { get; } + public static System.DateTime The28th { get; } + public static System.DateTime The29th { get; } + public static System.DateTime The2nd { get; } + public static System.DateTime The30th { get; } + public static System.DateTime The3rd { get; } + public static System.DateTime The4th { get; } + public static System.DateTime The5th { get; } + public static System.DateTime The6th { get; } + public static System.DateTime The7th { get; } + public static System.DateTime The8th { get; } + public static System.DateTime The9th { get; } + public static System.DateTime The(int dayNumber) { } + } + public class October + { + public October() { } + public static System.DateTime The10th { get; } + public static System.DateTime The11th { get; } + public static System.DateTime The12th { get; } + public static System.DateTime The13th { get; } + public static System.DateTime The14th { get; } + public static System.DateTime The15th { get; } + public static System.DateTime The16th { get; } + public static System.DateTime The17th { get; } + public static System.DateTime The18th { get; } + public static System.DateTime The19th { get; } + public static System.DateTime The1st { get; } + public static System.DateTime The20th { get; } + public static System.DateTime The21st { get; } + public static System.DateTime The22nd { get; } + public static System.DateTime The23rd { get; } + public static System.DateTime The24th { get; } + public static System.DateTime The25th { get; } + public static System.DateTime The26th { get; } + public static System.DateTime The27th { get; } + public static System.DateTime The28th { get; } + public static System.DateTime The29th { get; } + public static System.DateTime The2nd { get; } + public static System.DateTime The30th { get; } + public static System.DateTime The31st { get; } + public static System.DateTime The3rd { get; } + public static System.DateTime The4th { get; } + public static System.DateTime The5th { get; } + public static System.DateTime The6th { get; } + public static System.DateTime The7th { get; } + public static System.DateTime The8th { get; } + public static System.DateTime The9th { get; } + public static System.DateTime The(int dayNumber) { } + } + public class September + { + public September() { } + public static System.DateTime The10th { get; } + public static System.DateTime The11th { get; } + public static System.DateTime The12th { get; } + public static System.DateTime The13th { get; } + public static System.DateTime The14th { get; } + public static System.DateTime The15th { get; } + public static System.DateTime The16th { get; } + public static System.DateTime The17th { get; } + public static System.DateTime The18th { get; } + public static System.DateTime The19th { get; } + public static System.DateTime The1st { get; } + public static System.DateTime The20th { get; } + public static System.DateTime The21st { get; } + public static System.DateTime The22nd { get; } + public static System.DateTime The23rd { get; } + public static System.DateTime The24th { get; } + public static System.DateTime The25th { get; } + public static System.DateTime The26th { get; } + public static System.DateTime The27th { get; } + public static System.DateTime The28th { get; } + public static System.DateTime The29th { get; } + public static System.DateTime The2nd { get; } + public static System.DateTime The30th { get; } + public static System.DateTime The3rd { get; } + public static System.DateTime The4th { get; } + public static System.DateTime The5th { get; } + public static System.DateTime The6th { get; } + public static System.DateTime The7th { get; } + public static System.DateTime The8th { get; } + public static System.DateTime The9th { get; } + public static System.DateTime The(int dayNumber) { } + } + } + public class OnDate + { + public OnDate() { } + public class April + { + public April() { } + public static System.DateOnly The10th { get; } + public static System.DateOnly The11th { get; } + public static System.DateOnly The12th { get; } + public static System.DateOnly The13th { get; } + public static System.DateOnly The14th { get; } + public static System.DateOnly The15th { get; } + public static System.DateOnly The16th { get; } + public static System.DateOnly The17th { get; } + public static System.DateOnly The18th { get; } + public static System.DateOnly The19th { get; } + public static System.DateOnly The1st { get; } + public static System.DateOnly The20th { get; } + public static System.DateOnly The21st { get; } + public static System.DateOnly The22nd { get; } + public static System.DateOnly The23rd { get; } + public static System.DateOnly The24th { get; } + public static System.DateOnly The25th { get; } + public static System.DateOnly The26th { get; } + public static System.DateOnly The27th { get; } + public static System.DateOnly The28th { get; } + public static System.DateOnly The29th { get; } + public static System.DateOnly The2nd { get; } + public static System.DateOnly The30th { get; } + public static System.DateOnly The3rd { get; } + public static System.DateOnly The4th { get; } + public static System.DateOnly The5th { get; } + public static System.DateOnly The6th { get; } + public static System.DateOnly The7th { get; } + public static System.DateOnly The8th { get; } + public static System.DateOnly The9th { get; } + public static System.DateOnly The(int dayNumber) { } + } + public class August + { + public August() { } + public static System.DateOnly The10th { get; } + public static System.DateOnly The11th { get; } + public static System.DateOnly The12th { get; } + public static System.DateOnly The13th { get; } + public static System.DateOnly The14th { get; } + public static System.DateOnly The15th { get; } + public static System.DateOnly The16th { get; } + public static System.DateOnly The17th { get; } + public static System.DateOnly The18th { get; } + public static System.DateOnly The19th { get; } + public static System.DateOnly The1st { get; } + public static System.DateOnly The20th { get; } + public static System.DateOnly The21st { get; } + public static System.DateOnly The22nd { get; } + public static System.DateOnly The23rd { get; } + public static System.DateOnly The24th { get; } + public static System.DateOnly The25th { get; } + public static System.DateOnly The26th { get; } + public static System.DateOnly The27th { get; } + public static System.DateOnly The28th { get; } + public static System.DateOnly The29th { get; } + public static System.DateOnly The2nd { get; } + public static System.DateOnly The30th { get; } + public static System.DateOnly The31st { get; } + public static System.DateOnly The3rd { get; } + public static System.DateOnly The4th { get; } + public static System.DateOnly The5th { get; } + public static System.DateOnly The6th { get; } + public static System.DateOnly The7th { get; } + public static System.DateOnly The8th { get; } + public static System.DateOnly The9th { get; } + public static System.DateOnly The(int dayNumber) { } + } + public class December + { + public December() { } + public static System.DateOnly The10th { get; } + public static System.DateOnly The11th { get; } + public static System.DateOnly The12th { get; } + public static System.DateOnly The13th { get; } + public static System.DateOnly The14th { get; } + public static System.DateOnly The15th { get; } + public static System.DateOnly The16th { get; } + public static System.DateOnly The17th { get; } + public static System.DateOnly The18th { get; } + public static System.DateOnly The19th { get; } + public static System.DateOnly The1st { get; } + public static System.DateOnly The20th { get; } + public static System.DateOnly The21st { get; } + public static System.DateOnly The22nd { get; } + public static System.DateOnly The23rd { get; } + public static System.DateOnly The24th { get; } + public static System.DateOnly The25th { get; } + public static System.DateOnly The26th { get; } + public static System.DateOnly The27th { get; } + public static System.DateOnly The28th { get; } + public static System.DateOnly The29th { get; } + public static System.DateOnly The2nd { get; } + public static System.DateOnly The30th { get; } + public static System.DateOnly The31st { get; } + public static System.DateOnly The3rd { get; } + public static System.DateOnly The4th { get; } + public static System.DateOnly The5th { get; } + public static System.DateOnly The6th { get; } + public static System.DateOnly The7th { get; } + public static System.DateOnly The8th { get; } + public static System.DateOnly The9th { get; } + public static System.DateOnly The(int dayNumber) { } + } + public class February + { + public February() { } + public static System.DateOnly The10th { get; } + public static System.DateOnly The11th { get; } + public static System.DateOnly The12th { get; } + public static System.DateOnly The13th { get; } + public static System.DateOnly The14th { get; } + public static System.DateOnly The15th { get; } + public static System.DateOnly The16th { get; } + public static System.DateOnly The17th { get; } + public static System.DateOnly The18th { get; } + public static System.DateOnly The19th { get; } + public static System.DateOnly The1st { get; } + public static System.DateOnly The20th { get; } + public static System.DateOnly The21st { get; } + public static System.DateOnly The22nd { get; } + public static System.DateOnly The23rd { get; } + public static System.DateOnly The24th { get; } + public static System.DateOnly The25th { get; } + public static System.DateOnly The26th { get; } + public static System.DateOnly The27th { get; } + public static System.DateOnly The28th { get; } + public static System.DateOnly The29th { get; } + public static System.DateOnly The2nd { get; } + public static System.DateOnly The3rd { get; } + public static System.DateOnly The4th { get; } + public static System.DateOnly The5th { get; } + public static System.DateOnly The6th { get; } + public static System.DateOnly The7th { get; } + public static System.DateOnly The8th { get; } + public static System.DateOnly The9th { get; } + public static System.DateOnly The(int dayNumber) { } + } + public class January + { + public January() { } + public static System.DateOnly The10th { get; } + public static System.DateOnly The11th { get; } + public static System.DateOnly The12th { get; } + public static System.DateOnly The13th { get; } + public static System.DateOnly The14th { get; } + public static System.DateOnly The15th { get; } + public static System.DateOnly The16th { get; } + public static System.DateOnly The17th { get; } + public static System.DateOnly The18th { get; } + public static System.DateOnly The19th { get; } + public static System.DateOnly The1st { get; } + public static System.DateOnly The20th { get; } + public static System.DateOnly The21st { get; } + public static System.DateOnly The22nd { get; } + public static System.DateOnly The23rd { get; } + public static System.DateOnly The24th { get; } + public static System.DateOnly The25th { get; } + public static System.DateOnly The26th { get; } + public static System.DateOnly The27th { get; } + public static System.DateOnly The28th { get; } + public static System.DateOnly The29th { get; } + public static System.DateOnly The2nd { get; } + public static System.DateOnly The30th { get; } + public static System.DateOnly The31st { get; } + public static System.DateOnly The3rd { get; } + public static System.DateOnly The4th { get; } + public static System.DateOnly The5th { get; } + public static System.DateOnly The6th { get; } + public static System.DateOnly The7th { get; } + public static System.DateOnly The8th { get; } + public static System.DateOnly The9th { get; } + public static System.DateOnly The(int dayNumber) { } + } + public class July + { + public July() { } + public static System.DateOnly The10th { get; } + public static System.DateOnly The11th { get; } + public static System.DateOnly The12th { get; } + public static System.DateOnly The13th { get; } + public static System.DateOnly The14th { get; } + public static System.DateOnly The15th { get; } + public static System.DateOnly The16th { get; } + public static System.DateOnly The17th { get; } + public static System.DateOnly The18th { get; } + public static System.DateOnly The19th { get; } + public static System.DateOnly The1st { get; } + public static System.DateOnly The20th { get; } + public static System.DateOnly The21st { get; } + public static System.DateOnly The22nd { get; } + public static System.DateOnly The23rd { get; } + public static System.DateOnly The24th { get; } + public static System.DateOnly The25th { get; } + public static System.DateOnly The26th { get; } + public static System.DateOnly The27th { get; } + public static System.DateOnly The28th { get; } + public static System.DateOnly The29th { get; } + public static System.DateOnly The2nd { get; } + public static System.DateOnly The30th { get; } + public static System.DateOnly The31st { get; } + public static System.DateOnly The3rd { get; } + public static System.DateOnly The4th { get; } + public static System.DateOnly The5th { get; } + public static System.DateOnly The6th { get; } + public static System.DateOnly The7th { get; } + public static System.DateOnly The8th { get; } + public static System.DateOnly The9th { get; } + public static System.DateOnly The(int dayNumber) { } + } + public class June + { + public June() { } + public static System.DateOnly The10th { get; } + public static System.DateOnly The11th { get; } + public static System.DateOnly The12th { get; } + public static System.DateOnly The13th { get; } + public static System.DateOnly The14th { get; } + public static System.DateOnly The15th { get; } + public static System.DateOnly The16th { get; } + public static System.DateOnly The17th { get; } + public static System.DateOnly The18th { get; } + public static System.DateOnly The19th { get; } + public static System.DateOnly The1st { get; } + public static System.DateOnly The20th { get; } + public static System.DateOnly The21st { get; } + public static System.DateOnly The22nd { get; } + public static System.DateOnly The23rd { get; } + public static System.DateOnly The24th { get; } + public static System.DateOnly The25th { get; } + public static System.DateOnly The26th { get; } + public static System.DateOnly The27th { get; } + public static System.DateOnly The28th { get; } + public static System.DateOnly The29th { get; } + public static System.DateOnly The2nd { get; } + public static System.DateOnly The30th { get; } + public static System.DateOnly The3rd { get; } + public static System.DateOnly The4th { get; } + public static System.DateOnly The5th { get; } + public static System.DateOnly The6th { get; } + public static System.DateOnly The7th { get; } + public static System.DateOnly The8th { get; } + public static System.DateOnly The9th { get; } + public static System.DateOnly The(int dayNumber) { } + } + public class March + { + public March() { } + public static System.DateOnly The10th { get; } + public static System.DateOnly The11th { get; } + public static System.DateOnly The12th { get; } + public static System.DateOnly The13th { get; } + public static System.DateOnly The14th { get; } + public static System.DateOnly The15th { get; } + public static System.DateOnly The16th { get; } + public static System.DateOnly The17th { get; } + public static System.DateOnly The18th { get; } + public static System.DateOnly The19th { get; } + public static System.DateOnly The1st { get; } + public static System.DateOnly The20th { get; } + public static System.DateOnly The21st { get; } + public static System.DateOnly The22nd { get; } + public static System.DateOnly The23rd { get; } + public static System.DateOnly The24th { get; } + public static System.DateOnly The25th { get; } + public static System.DateOnly The26th { get; } + public static System.DateOnly The27th { get; } + public static System.DateOnly The28th { get; } + public static System.DateOnly The29th { get; } + public static System.DateOnly The2nd { get; } + public static System.DateOnly The30th { get; } + public static System.DateOnly The31st { get; } + public static System.DateOnly The3rd { get; } + public static System.DateOnly The4th { get; } + public static System.DateOnly The5th { get; } + public static System.DateOnly The6th { get; } + public static System.DateOnly The7th { get; } + public static System.DateOnly The8th { get; } + public static System.DateOnly The9th { get; } + public static System.DateOnly The(int dayNumber) { } + } + public class May + { + public May() { } + public static System.DateOnly The10th { get; } + public static System.DateOnly The11th { get; } + public static System.DateOnly The12th { get; } + public static System.DateOnly The13th { get; } + public static System.DateOnly The14th { get; } + public static System.DateOnly The15th { get; } + public static System.DateOnly The16th { get; } + public static System.DateOnly The17th { get; } + public static System.DateOnly The18th { get; } + public static System.DateOnly The19th { get; } + public static System.DateOnly The1st { get; } + public static System.DateOnly The20th { get; } + public static System.DateOnly The21st { get; } + public static System.DateOnly The22nd { get; } + public static System.DateOnly The23rd { get; } + public static System.DateOnly The24th { get; } + public static System.DateOnly The25th { get; } + public static System.DateOnly The26th { get; } + public static System.DateOnly The27th { get; } + public static System.DateOnly The28th { get; } + public static System.DateOnly The29th { get; } + public static System.DateOnly The2nd { get; } + public static System.DateOnly The30th { get; } + public static System.DateOnly The31st { get; } + public static System.DateOnly The3rd { get; } + public static System.DateOnly The4th { get; } + public static System.DateOnly The5th { get; } + public static System.DateOnly The6th { get; } + public static System.DateOnly The7th { get; } + public static System.DateOnly The8th { get; } + public static System.DateOnly The9th { get; } + public static System.DateOnly The(int dayNumber) { } + } + public class November + { + public November() { } + public static System.DateOnly The10th { get; } + public static System.DateOnly The11th { get; } + public static System.DateOnly The12th { get; } + public static System.DateOnly The13th { get; } + public static System.DateOnly The14th { get; } + public static System.DateOnly The15th { get; } + public static System.DateOnly The16th { get; } + public static System.DateOnly The17th { get; } + public static System.DateOnly The18th { get; } + public static System.DateOnly The19th { get; } + public static System.DateOnly The1st { get; } + public static System.DateOnly The20th { get; } + public static System.DateOnly The21st { get; } + public static System.DateOnly The22nd { get; } + public static System.DateOnly The23rd { get; } + public static System.DateOnly The24th { get; } + public static System.DateOnly The25th { get; } + public static System.DateOnly The26th { get; } + public static System.DateOnly The27th { get; } + public static System.DateOnly The28th { get; } + public static System.DateOnly The29th { get; } + public static System.DateOnly The2nd { get; } + public static System.DateOnly The30th { get; } + public static System.DateOnly The3rd { get; } + public static System.DateOnly The4th { get; } + public static System.DateOnly The5th { get; } + public static System.DateOnly The6th { get; } + public static System.DateOnly The7th { get; } + public static System.DateOnly The8th { get; } + public static System.DateOnly The9th { get; } + public static System.DateOnly The(int dayNumber) { } + } + public class October + { + public October() { } + public static System.DateOnly The10th { get; } + public static System.DateOnly The11th { get; } + public static System.DateOnly The12th { get; } + public static System.DateOnly The13th { get; } + public static System.DateOnly The14th { get; } + public static System.DateOnly The15th { get; } + public static System.DateOnly The16th { get; } + public static System.DateOnly The17th { get; } + public static System.DateOnly The18th { get; } + public static System.DateOnly The19th { get; } + public static System.DateOnly The1st { get; } + public static System.DateOnly The20th { get; } + public static System.DateOnly The21st { get; } + public static System.DateOnly The22nd { get; } + public static System.DateOnly The23rd { get; } + public static System.DateOnly The24th { get; } + public static System.DateOnly The25th { get; } + public static System.DateOnly The26th { get; } + public static System.DateOnly The27th { get; } + public static System.DateOnly The28th { get; } + public static System.DateOnly The29th { get; } + public static System.DateOnly The2nd { get; } + public static System.DateOnly The30th { get; } + public static System.DateOnly The31st { get; } + public static System.DateOnly The3rd { get; } + public static System.DateOnly The4th { get; } + public static System.DateOnly The5th { get; } + public static System.DateOnly The6th { get; } + public static System.DateOnly The7th { get; } + public static System.DateOnly The8th { get; } + public static System.DateOnly The9th { get; } + public static System.DateOnly The(int dayNumber) { } + } + public class September + { + public September() { } + public static System.DateOnly The10th { get; } + public static System.DateOnly The11th { get; } + public static System.DateOnly The12th { get; } + public static System.DateOnly The13th { get; } + public static System.DateOnly The14th { get; } + public static System.DateOnly The15th { get; } + public static System.DateOnly The16th { get; } + public static System.DateOnly The17th { get; } + public static System.DateOnly The18th { get; } + public static System.DateOnly The19th { get; } + public static System.DateOnly The1st { get; } + public static System.DateOnly The20th { get; } + public static System.DateOnly The21st { get; } + public static System.DateOnly The22nd { get; } + public static System.DateOnly The23rd { get; } + public static System.DateOnly The24th { get; } + public static System.DateOnly The25th { get; } + public static System.DateOnly The26th { get; } + public static System.DateOnly The27th { get; } + public static System.DateOnly The28th { get; } + public static System.DateOnly The29th { get; } + public static System.DateOnly The2nd { get; } + public static System.DateOnly The30th { get; } + public static System.DateOnly The3rd { get; } + public static System.DateOnly The4th { get; } + public static System.DateOnly The5th { get; } + public static System.DateOnly The6th { get; } + public static System.DateOnly The7th { get; } + public static System.DateOnly The8th { get; } + public static System.DateOnly The9th { get; } + public static System.DateOnly The(int dayNumber) { } + } + } + public enum OnNoMatch + { + ThrowsException = 0, + ReturnsNull = 1, + } + public class static OrdinalizeExtensions + { + public static string Ordinalize(this string numberString) { } + public static string Ordinalize(this string numberString, System.Globalization.CultureInfo culture) { } + public static string Ordinalize(this string numberString, Humanizer.GrammaticalGender gender) { } + public static string Ordinalize(this string numberString, Humanizer.GrammaticalGender gender, System.Globalization.CultureInfo culture) { } + public static string Ordinalize(this int number) { } + public static string Ordinalize(this int number, System.Globalization.CultureInfo culture) { } + public static string Ordinalize(this int number, Humanizer.GrammaticalGender gender) { } + public static string Ordinalize(this int number, Humanizer.GrammaticalGender gender, System.Globalization.CultureInfo culture) { } + } + public enum Plurality + { + Singular = 0, + Plural = 1, + CouldBeEither = 2, + } + public class static PrepositionsExtensions + { + public static System.DateTime At(this System.DateTime date, int hour, int min = 0, int second = 0, int millisecond = 0) { } + public static System.DateTime AtMidnight(this System.DateTime date) { } + public static System.DateTime AtNoon(this System.DateTime date) { } + public static System.DateTime In(this System.DateTime date, int year) { } + } + public class static RomanNumeralExtensions + { + public static int FromRoman(this string input) { } + public static string ToRoman(this int input) { } + } + public enum ShowQuantityAs + { + None = 0, + Numeric = 1, + Words = 2, + } + public class static StringDehumanizeExtensions + { + public static string Dehumanize(this string input) { } + } + public class static StringExtensions + { + public static string FormatWith(this string format, params object[] args) { } + public static string FormatWith(this string format, System.IFormatProvider provider, params object[] args) { } + } + public class static StringHumanizeExtensions + { + public static string Humanize(this string input) { } + public static string Humanize(this string input, Humanizer.LetterCasing casing) { } + } + public class static TimeOnlyToClockNotationExtensions + { + public static string ToClockNotation(this System.TimeOnly input) { } + } + public class static TimeSpanHumanizeExtensions + { + public static string Humanize(this System.TimeSpan timeSpan, int precision = 1, System.Globalization.CultureInfo culture = null, Humanizer.Localisation.TimeUnit maxUnit = 5, Humanizer.Localisation.TimeUnit minUnit = 0, string collectionSeparator = ", ", bool toWords = False) { } + public static string Humanize(this System.TimeSpan timeSpan, int precision, bool countEmptyUnits, System.Globalization.CultureInfo culture = null, Humanizer.Localisation.TimeUnit maxUnit = 5, Humanizer.Localisation.TimeUnit minUnit = 0, string collectionSeparator = ", ", bool toWords = False) { } + } + public class static To + { + public static Humanizer.ICulturedStringTransformer LowerCase { get; } + public static Humanizer.ICulturedStringTransformer SentenceCase { get; } + public static Humanizer.ICulturedStringTransformer TitleCase { get; } + public static Humanizer.ICulturedStringTransformer UpperCase { get; } + public static string Transform(this string input, params Humanizer.IStringTransformer[] transformers) { } + public static string Transform(this string input, System.Globalization.CultureInfo culture, params Humanizer.ICulturedStringTransformer[] transformers) { } + } + public class static ToQuantityExtensions + { + public static string ToQuantity(this string input, int quantity, Humanizer.ShowQuantityAs showQuantityAs = 1) { } + public static string ToQuantity(this string input, int quantity, string format, System.IFormatProvider formatProvider = null) { } + public static string ToQuantity(this string input, long quantity, Humanizer.ShowQuantityAs showQuantityAs = 1) { } + public static string ToQuantity(this string input, long quantity, string format, System.IFormatProvider formatProvider = null) { } + public static string ToQuantity(this string input, double quantity, string format = null, System.IFormatProvider formatProvider = null) { } + public static string ToQuantity(this string input, double quantity) { } + } + public class static TruncateExtensions + { + public static string Truncate(this string input, int length) { } + public static string Truncate(this string input, int length, Humanizer.ITruncator truncator, Humanizer.TruncateFrom from = 1) { } + public static string Truncate(this string input, int length, string truncationString, Humanizer.TruncateFrom from = 1) { } + public static string Truncate(this string input, int length, string truncationString, Humanizer.ITruncator truncator, Humanizer.TruncateFrom from = 1) { } + } + public enum TruncateFrom + { + Left = 0, + Right = 1, + } + public class static Truncator + { + public static Humanizer.ITruncator FixedLength { get; } + public static Humanizer.ITruncator FixedNumberOfCharacters { get; } + public static Humanizer.ITruncator FixedNumberOfWords { get; } + } + public class static TupleizeExtensions + { + public static string Tupleize(this int input) { } + } +} +namespace Humanizer.Bytes +{ + public class ByteRate + { + public ByteRate(Humanizer.Bytes.ByteSize size, System.TimeSpan interval) { } + public System.TimeSpan Interval { get; } + public Humanizer.Bytes.ByteSize Size { get; } + public string Humanize(Humanizer.Localisation.TimeUnit timeUnit = 1) { } + public string Humanize(string format, Humanizer.Localisation.TimeUnit timeUnit = 1) { } + } + public struct ByteSize : System.IComparable, System.IComparable, System.IEquatable, System.IFormattable + { + public const string Bit = "bit"; + public const string BitSymbol = "b"; + public const long BitsInByte = 8; + public const string Byte = "byte"; + public const string ByteSymbol = "B"; + public const long BytesInGigabyte = 1073741824; + public const long BytesInKilobyte = 1024; + public const long BytesInMegabyte = 1048576; + public const long BytesInTerabyte = 1099511627776; + public const string Gigabyte = "gigabyte"; + public const string GigabyteSymbol = "GB"; + public const string Kilobyte = "kilobyte"; + public const string KilobyteSymbol = "KB"; + public static readonly Humanizer.Bytes.ByteSize MaxValue; + public const string Megabyte = "megabyte"; + public const string MegabyteSymbol = "MB"; + public static readonly Humanizer.Bytes.ByteSize MinValue; + public const string Terabyte = "terabyte"; + public const string TerabyteSymbol = "TB"; + public ByteSize(double byteSize) { } + [get: System.Runtime.CompilerServices.IsReadOnlyAttribute()] + public long Bits { get; } + [get: System.Runtime.CompilerServices.IsReadOnlyAttribute()] + public double Bytes { get; } + [get: System.Runtime.CompilerServices.IsReadOnlyAttribute()] + public double Gigabytes { get; } + [get: System.Runtime.CompilerServices.IsReadOnlyAttribute()] + public double Kilobytes { get; } + public string LargestWholeNumberFullWord { get; } + public string LargestWholeNumberSymbol { get; } + public double LargestWholeNumberValue { get; } + [get: System.Runtime.CompilerServices.IsReadOnlyAttribute()] + public double Megabytes { get; } + [get: System.Runtime.CompilerServices.IsReadOnlyAttribute()] + public double Terabytes { get; } + public Humanizer.Bytes.ByteSize Add(Humanizer.Bytes.ByteSize bs) { } + public Humanizer.Bytes.ByteSize AddBits(long value) { } + public Humanizer.Bytes.ByteSize AddBytes(double value) { } + public Humanizer.Bytes.ByteSize AddGigabytes(double value) { } + public Humanizer.Bytes.ByteSize AddKilobytes(double value) { } + public Humanizer.Bytes.ByteSize AddMegabytes(double value) { } + public Humanizer.Bytes.ByteSize AddTerabytes(double value) { } + public int CompareTo(object obj) { } + public int CompareTo(Humanizer.Bytes.ByteSize other) { } + public override bool Equals(object value) { } + public bool Equals(Humanizer.Bytes.ByteSize value) { } + public static Humanizer.Bytes.ByteSize FromBits(long value) { } + public static Humanizer.Bytes.ByteSize FromBytes(double value) { } + public static Humanizer.Bytes.ByteSize FromGigabytes(double value) { } + public static Humanizer.Bytes.ByteSize FromKilobytes(double value) { } + public static Humanizer.Bytes.ByteSize FromMegabytes(double value) { } + public static Humanizer.Bytes.ByteSize FromTerabytes(double value) { } + public override int GetHashCode() { } + public string GetLargestWholeNumberFullWord(System.IFormatProvider provider = null) { } + public string GetLargestWholeNumberSymbol(System.IFormatProvider provider = null) { } + public static Humanizer.Bytes.ByteSize Parse(string s) { } + public static Humanizer.Bytes.ByteSize Parse(string s, System.IFormatProvider formatProvider) { } + public Humanizer.Bytes.ByteSize Subtract(Humanizer.Bytes.ByteSize bs) { } + public string ToFullWords(string format = null, System.IFormatProvider provider = null) { } + public override string ToString() { } + public string ToString(System.IFormatProvider provider) { } + public string ToString(string format) { } + public string ToString(string format, System.IFormatProvider provider) { } + public static bool TryParse(string s, out Humanizer.Bytes.ByteSize result) { } + public static bool TryParse(string s, System.IFormatProvider formatProvider, out Humanizer.Bytes.ByteSize result) { } + public static Humanizer.Bytes.ByteSize +(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } + public static Humanizer.Bytes.ByteSize --(Humanizer.Bytes.ByteSize b) { } + public static bool ==(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } + public static bool >(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } + public static bool >=(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } + public static Humanizer.Bytes.ByteSize ++(Humanizer.Bytes.ByteSize b) { } + public static bool !=(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } + public static bool <(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } + public static bool <=(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } + public static Humanizer.Bytes.ByteSize -(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } + public static Humanizer.Bytes.ByteSize -(Humanizer.Bytes.ByteSize b) { } + } +} +namespace Humanizer.Configuration +{ + public class static Configurator + { + public static Humanizer.Configuration.LocaliserRegistry CollectionFormatters { get; } + public static Humanizer.DateTimeHumanizeStrategy.IDateOnlyHumanizeStrategy DateOnlyHumanizeStrategy { get; set; } + public static Humanizer.Configuration.LocaliserRegistry DateOnlyToOrdinalWordsConverters { get; } + public static Humanizer.DateTimeHumanizeStrategy.IDateTimeHumanizeStrategy DateTimeHumanizeStrategy { get; set; } + public static Humanizer.DateTimeHumanizeStrategy.IDateTimeOffsetHumanizeStrategy DateTimeOffsetHumanizeStrategy { get; set; } + public static Humanizer.Configuration.LocaliserRegistry DateToOrdinalWordsConverters { get; } + public static System.Func EnumDescriptionPropertyLocator { get; set; } + public static Humanizer.Configuration.LocaliserRegistry Formatters { get; } + public static Humanizer.Configuration.LocaliserRegistry NumberToWordsConverters { get; } + public static Humanizer.Configuration.LocaliserRegistry Ordinalizers { get; } + public static Humanizer.DateTimeHumanizeStrategy.ITimeOnlyHumanizeStrategy TimeOnlyHumanizeStrategy { get; set; } + public static Humanizer.Configuration.LocaliserRegistry TimeOnlyToClockNotationConverters { get; } + } + public class LocaliserRegistry + where TLocaliser : class + { + public LocaliserRegistry(TLocaliser defaultLocaliser) { } + public LocaliserRegistry(System.Func defaultLocaliser) { } + public void Register(string localeCode, TLocaliser localiser) { } + public void Register(string localeCode, System.Func localiser) { } + public TLocaliser ResolveForCulture(System.Globalization.CultureInfo culture) { } + public TLocaliser ResolveForUiCulture() { } + } +} +namespace Humanizer.DateTimeHumanizeStrategy +{ + public class DefaultDateOnlyHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateOnlyHumanizeStrategy + { + public DefaultDateOnlyHumanizeStrategy() { } + public string Humanize(System.DateOnly input, System.DateOnly comparisonBase, System.Globalization.CultureInfo culture) { } + } + public class DefaultDateTimeHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateTimeHumanizeStrategy + { + public DefaultDateTimeHumanizeStrategy() { } + public string Humanize(System.DateTime input, System.DateTime comparisonBase, System.Globalization.CultureInfo culture) { } + } + public class DefaultDateTimeOffsetHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateTimeOffsetHumanizeStrategy + { + public DefaultDateTimeOffsetHumanizeStrategy() { } + public string Humanize(System.DateTimeOffset input, System.DateTimeOffset comparisonBase, System.Globalization.CultureInfo culture) { } + } + public class DefaultTimeOnlyHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.ITimeOnlyHumanizeStrategy + { + public DefaultTimeOnlyHumanizeStrategy() { } + public string Humanize(System.TimeOnly input, System.TimeOnly comparisonBase, System.Globalization.CultureInfo culture) { } + } + public interface IDateOnlyHumanizeStrategy + { + string Humanize(System.DateOnly input, System.DateOnly comparisonBase, System.Globalization.CultureInfo culture); + } + public interface IDateTimeHumanizeStrategy + { + string Humanize(System.DateTime input, System.DateTime comparisonBase, System.Globalization.CultureInfo culture); + } + public interface IDateTimeOffsetHumanizeStrategy + { + string Humanize(System.DateTimeOffset input, System.DateTimeOffset comparisonBase, System.Globalization.CultureInfo culture); + } + public interface ITimeOnlyHumanizeStrategy + { + string Humanize(System.TimeOnly input, System.TimeOnly comparisonBase, System.Globalization.CultureInfo culture); + } + public class PrecisionDateOnlyHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateOnlyHumanizeStrategy + { + public PrecisionDateOnlyHumanizeStrategy(double precision = 0.75) { } + public string Humanize(System.DateOnly input, System.DateOnly comparisonBase, System.Globalization.CultureInfo culture) { } + } + public class PrecisionDateTimeHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateTimeHumanizeStrategy + { + public PrecisionDateTimeHumanizeStrategy(double precision = 0.75) { } + public string Humanize(System.DateTime input, System.DateTime comparisonBase, System.Globalization.CultureInfo culture) { } + } + public class PrecisionDateTimeOffsetHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateTimeOffsetHumanizeStrategy + { + public PrecisionDateTimeOffsetHumanizeStrategy(double precision = 0.75) { } + public string Humanize(System.DateTimeOffset input, System.DateTimeOffset comparisonBase, System.Globalization.CultureInfo culture) { } + } + public class PrecisionTimeOnlyHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.ITimeOnlyHumanizeStrategy + { + public PrecisionTimeOnlyHumanizeStrategy(double precision = 0.75) { } + public string Humanize(System.TimeOnly input, System.TimeOnly comparisonBase, System.Globalization.CultureInfo culture) { } + } +} +namespace Humanizer.Inflections +{ + public class static Vocabularies + { + public static Humanizer.Inflections.Vocabulary Default { get; } + } + public class Vocabulary + { + public void AddIrregular(string singular, string plural, bool matchEnding = True) { } + public void AddPlural(string rule, string replacement) { } + public void AddSingular(string rule, string replacement) { } + public void AddUncountable(string word) { } + public string Pluralize(string word, bool inputIsKnownToBeSingular = True) { } + public string Singularize(string word, bool inputIsKnownToBePlural = True, bool skipSimpleWords = False) { } + } +} +namespace Humanizer.Localisation.CollectionFormatters +{ + public interface ICollectionFormatter + { + string Humanize(System.Collections.Generic.IEnumerable collection); + string Humanize(System.Collections.Generic.IEnumerable collection, System.Func objectFormatter); + string Humanize(System.Collections.Generic.IEnumerable collection, System.Func objectFormatter); + string Humanize(System.Collections.Generic.IEnumerable collection, string separator); + string Humanize(System.Collections.Generic.IEnumerable collection, System.Func objectFormatter, string separator); + string Humanize(System.Collections.Generic.IEnumerable collection, System.Func objectFormatter, string separator); + } +} +namespace Humanizer.Localisation +{ + public enum DataUnit + { + Bit = 0, + Byte = 1, + Kilobyte = 2, + Megabyte = 3, + Gigabyte = 4, + Terabyte = 5, + } + public class ResourceKeys + { + public ResourceKeys() { } + public class static DateHumanize + { + public const string Never = "DateHumanize_Never"; + public const string Now = "DateHumanize_Now"; + public static string GetResourceKey(Humanizer.Localisation.TimeUnit timeUnit, Humanizer.Localisation.Tense timeUnitTense, int count = 1) { } + } + public class static TimeSpanHumanize + { + public static string GetResourceKey(Humanizer.Localisation.TimeUnit unit, int count = 1, bool toWords = False) { } + } + } + public class static Resources + { + public static string GetResource(string resourceKey, System.Globalization.CultureInfo culture = null) { } + } + public enum Tense + { + Future = 0, + Past = 1, + } + public enum TimeUnit + { + Millisecond = 0, + Second = 1, + Minute = 2, + Hour = 3, + Day = 4, + Week = 5, + Month = 6, + Year = 7, + } +} +namespace Humanizer.Localisation.DateToOrdinalWords +{ + public interface IDateOnlyToOrdinalWordConverter + { + string Convert(System.DateOnly date); + string Convert(System.DateOnly date, Humanizer.GrammaticalCase grammaticalCase); + } + public interface IDateToOrdinalWordConverter + { + string Convert(System.DateTime date); + string Convert(System.DateTime date, Humanizer.GrammaticalCase grammaticalCase); + } +} +namespace Humanizer.Localisation.Formatters +{ + public class DefaultFormatter : Humanizer.Localisation.Formatters.IFormatter + { + public DefaultFormatter(string localeCode) { } + public virtual string DataUnitHumanize(Humanizer.Localisation.DataUnit dataUnit, double count, bool toSymbol = True) { } + public virtual string DateHumanize(Humanizer.Localisation.TimeUnit timeUnit, Humanizer.Localisation.Tense timeUnitTense, int unit) { } + public virtual string DateHumanize_Never() { } + public virtual string DateHumanize_Now() { } + protected virtual string Format(string resourceKey) { } + protected virtual string Format(string resourceKey, int number, bool toWords = False) { } + protected virtual string GetResourceKey(string resourceKey, int number) { } + protected virtual string GetResourceKey(string resourceKey) { } + public virtual string TimeSpanHumanize(Humanizer.Localisation.TimeUnit timeUnit, int unit, bool toWords = False) { } + public virtual string TimeSpanHumanize_Zero() { } + } + public interface IFormatter + { + string DataUnitHumanize(Humanizer.Localisation.DataUnit dataUnit, double count, bool toSymbol = True); + string DateHumanize(Humanizer.Localisation.TimeUnit timeUnit, Humanizer.Localisation.Tense timeUnitTense, int unit); + string DateHumanize_Never(); + string DateHumanize_Now(); + string TimeSpanHumanize(Humanizer.Localisation.TimeUnit timeUnit, int unit, bool toWords = False); + string TimeSpanHumanize_Zero(); + } +} +namespace Humanizer.Localisation.NumberToWords +{ + public interface INumberToWordsConverter + { + string Convert(long number); + string Convert(long number, bool addAnd); + string Convert(long number, Humanizer.GrammaticalGender gender, bool addAnd = True); + string ConvertToOrdinal(int number); + string ConvertToOrdinal(int number, Humanizer.GrammaticalGender gender); + string ConvertToTuple(int number); + } +} +namespace Humanizer.Localisation.Ordinalizers +{ + public interface IOrdinalizer + { + string Convert(int number, string numberString); + string Convert(int number, string numberString, Humanizer.GrammaticalGender gender); + } +} +namespace Humanizer.Localisation.TimeToClockNotation +{ + public interface ITimeOnlyToClockNotationConverter + { + string Convert(System.TimeOnly time); + } + public class TimeOnlyToClockNotationConverter : Humanizer.Localisation.TimeToClockNotation.ITimeOnlyToClockNotationConverter + { + public TimeOnlyToClockNotationConverter() { } + public virtual string Convert(System.TimeOnly time) { } + } +} \ No newline at end of file diff --git a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt index 759acd8cf..d7201d209 100644 --- a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt +++ b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt @@ -1953,13 +1953,18 @@ namespace Humanizer.Localisation.Ordinalizers } namespace Humanizer.Localisation.TimeToClockNotation { + public class DefaultTimeOnlyToClockNotationConverter : Humanizer.Localisation.TimeToClockNotation.ITimeOnlyToClockNotationConverter + { + public DefaultTimeOnlyToClockNotationConverter() { } + public virtual string Convert(System.TimeOnly time) { } + } public interface ITimeOnlyToClockNotationConverter { string Convert(System.TimeOnly time); } - public class TimeOnlyToClockNotationConverter : Humanizer.Localisation.TimeToClockNotation.ITimeOnlyToClockNotationConverter + public class PtBrTimeOnlyToClockNotationConverter : Humanizer.Localisation.TimeToClockNotation.ITimeOnlyToClockNotationConverter { - public TimeOnlyToClockNotationConverter() { } + public PtBrTimeOnlyToClockNotationConverter() { } public virtual string Convert(System.TimeOnly time) { } } } \ No newline at end of file diff --git a/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs b/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs index aad73ef7a..37aceea14 100644 --- a/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs +++ b/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs @@ -6,12 +6,12 @@ namespace Humanizer.Configuration { internal class TimeOnlyToClockNotationConvertersRegistry : LocaliserRegistry { - public TimeOnlyToClockNotationConvertersRegistry() : base(new TimeOnlyToClockNotationConverter()) + public TimeOnlyToClockNotationConvertersRegistry() : base(new DefaultTimeOnlyToClockNotationConverter()) { - Register("en-US", new TimeOnlyToClockNotationConverter()); - Register("en-UK", new TimeOnlyToClockNotationConverter()); - Register("de", new TimeOnlyToClockNotationConverter()); - Register("pt-BR", new TimeOnlyToClockNotationConverter()); + Register("en-US", new DefaultTimeOnlyToClockNotationConverter()); + Register("en-UK", new DefaultTimeOnlyToClockNotationConverter()); + Register("de", new DefaultTimeOnlyToClockNotationConverter()); + Register("pt-BR", new PtBrTimeOnlyToClockNotationConverter()); } } } diff --git a/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs index f5145f2eb..f9f6124be 100644 --- a/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs +++ b/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs @@ -4,7 +4,7 @@ namespace Humanizer.Localisation.TimeToClockNotation { - public class TimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter + public class DefaultTimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter { public virtual string Convert(TimeOnly time) { diff --git a/src/Humanizer/Localisation/TimeToClockNotation/PtBrTimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/PtBrTimeOnlyToClockNotationConverter.cs new file mode 100644 index 000000000..6d372e9a7 --- /dev/null +++ b/src/Humanizer/Localisation/TimeToClockNotation/PtBrTimeOnlyToClockNotationConverter.cs @@ -0,0 +1,35 @@ +#if NET6_0_OR_GREATER + +using System; + +namespace Humanizer.Localisation.TimeToClockNotation +{ + public class PtBrTimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter + { + public virtual string Convert(TimeOnly time) + { + switch (time) + { + case { Hour: 0, Minute: 0 }: + return "meia-noite"; + case { Hour: 12, Minute: 0 }: + return "meio-dia"; + } + + var normalizedHour = time.Hour % 12; + + return time switch + { + { Minute: 00 } => $"{normalizedHour.ToWords()} em ponto", + { Minute: 30 } => $"{normalizedHour.ToWords()} e meia", + { Minute: 40 } => $"vinte para as {(normalizedHour + 1).ToWords()}", + { Minute: 45 } => $"quinze para as {(normalizedHour + 1).ToWords()}", + { Minute: 50 } => $"dez para as {(normalizedHour + 1).ToWords()}", + { Minute: 55 } => $"cinco para as {(normalizedHour + 1).ToWords()}", + _ => $"{normalizedHour.ToWords()} e {time.Minute.ToWords()}" + }; + } + } +} + +#endif From bbd528383c71389613a329b2269c5f829a9c46e8 Mon Sep 17 00:00:00 2001 From: Luiz Strobelt Date: Wed, 27 Oct 2021 00:49:24 -0300 Subject: [PATCH 05/12] Fix documentation and README --- readme.md | 15 +++++++++++++++ src/Humanizer/Configuration/Configurator.cs | 2 +- .../ITimeOnlyToClockNotationConverter.cs | 4 ++-- .../TimeOnlyToClockNotationExtensions.cs | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 79ab0e674..c594e2e61 100644 --- a/readme.md +++ b/readme.md @@ -39,6 +39,7 @@ Humanizer meets all your .NET needs for manipulating and displaying strings, enu - [Number to words](#number-to-words) - [Number to ordinal words](#number-to-ordinal-words) - [DateTime to ordinal words](#date-time-to-ordinal-words) + - [TimeOnly to Clock Notation](#time-only-to-clock-notation) - [Roman numerals](#roman-numerals) - [Metric numerals](#metric-numerals) - [ByteSize](#bytesize) @@ -864,6 +865,20 @@ The possible values are `GrammaticalCase.Nominative`, `GrammaticalCase.Genitive` Obviously this only applies to some cultures. For others passing case in doesn't make any difference in the result. +### TimeOnly to Clock Notation +Extends TimeOnly to allow humanizing it to a clock notation +```C# +// for English US locale +new TimeOnly(3, 0).ToClockNotation() => "three o'clock" +new TimeOnly(12, 0).ToClockNotation() => "noon" +new TimeOnly(14, 30).ToClockNotation() => "half past two" + +// for Brazilian Portuguese locale +new TimeOnly(3, 0).ToClockNotation() => "três em ponto" +new TimeOnly(12, 0).ToClockNotation() => "meio-dia" +new TimeOnly(14, 30).ToClockNotation() => "duas e meia" +``` + ### Roman numerals Humanizer can change numbers to Roman numerals using the `ToRoman` extension. The numbers 1 to 10 can be expressed in Roman numerals as follows: diff --git a/src/Humanizer/Configuration/Configurator.cs b/src/Humanizer/Configuration/Configurator.cs index 6c2c3b23d..157d76865 100644 --- a/src/Humanizer/Configuration/Configurator.cs +++ b/src/Humanizer/Configuration/Configurator.cs @@ -76,7 +76,7 @@ public static LocaliserRegistry DateOnlyToOrdin private static readonly LocaliserRegistry _timeOnlyToClockNotationConverters = new TimeOnlyToClockNotationConvertersRegistry(); /// - /// A registry of ordinalizers used to localise Ordinalize method + /// A registry of time to clock notation converters used to localise ToClockNotation methods /// public static LocaliserRegistry TimeOnlyToClockNotationConverters { diff --git a/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs index 659adf5b7..39172b524 100644 --- a/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs +++ b/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs @@ -7,12 +7,12 @@ namespace Humanizer.Localisation.TimeToClockNotation { /// - /// The interface used to localise the ToClockWords method. + /// The interface used to localise the ToClockNotation method. /// public interface ITimeOnlyToClockNotationConverter { /// - /// Converts the time to Clock Words + /// Converts the time to Clock Notation /// /// /// diff --git a/src/Humanizer/TimeOnlyToClockNotationExtensions.cs b/src/Humanizer/TimeOnlyToClockNotationExtensions.cs index a56f0f443..fba6c6da9 100644 --- a/src/Humanizer/TimeOnlyToClockNotationExtensions.cs +++ b/src/Humanizer/TimeOnlyToClockNotationExtensions.cs @@ -6,7 +6,7 @@ namespace Humanizer { /// - /// Humanizes DateTime into human readable sentence + /// Humanizes TimeOnly into human readable sentence /// public static class TimeOnlyToClockNotationExtensions { From f20c6f3ca7730f7c4dd176eecad1d2b444d61797 Mon Sep 17 00:00:00 2001 From: Luiz Strobelt Date: Wed, 27 Oct 2021 01:07:16 -0300 Subject: [PATCH 06/12] Revert unwnanted changes --- .../DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs b/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs index 3a54453fc..fb34cf7c7 100644 --- a/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs +++ b/src/Humanizer/DateTimeHumanizeStrategy/DateTimeHumanizeAlgorithms.cs @@ -1,6 +1,5 @@ using System; using System.Globalization; - using Humanizer.Configuration; using Humanizer.Localisation; @@ -213,7 +212,7 @@ private static string DefaultHumanize(TimeSpan ts, bool sameMonth, int days, Ten } if (ts.TotalHours < 48) - { + { return formatter.DateHumanize(TimeUnit.Day, tense, days); } From 77789936bbe5d4fa7294634c540525bf7490f736 Mon Sep 17 00:00:00 2001 From: Luiz Strobelt Date: Wed, 27 Oct 2021 12:14:29 -0300 Subject: [PATCH 07/12] Address PR suggestions --- .../Humanizer.Tests.Shared.projitems | 2 + .../en/TimeToClockNotationTests.cs | 24 - .../pt-BR/TimeToClockNotationTests.cs | 36 + ...lTest.Approve_Public_Api.approved.txt.orig | 1955 ----------------- ...provalTest.approve_public_api.approved.txt | 10 +- ...meOnlyToClockNotationConvertersRegistry.cs | 2 +- ...ugueseTimeOnlyToClockNotationConverter.cs} | 2 +- 7 files changed, 45 insertions(+), 1986 deletions(-) create mode 100644 src/Humanizer.Tests.Shared/Localisation/pt-BR/TimeToClockNotationTests.cs delete mode 100644 src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.Approve_Public_Api.approved.txt.orig rename src/Humanizer/Localisation/TimeToClockNotation/{PtBrTimeOnlyToClockNotationConverter.cs => BrazilianPortugueseTimeOnlyToClockNotationConverter.cs} (91%) diff --git a/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems b/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems index d2a2bcb77..f67af31f6 100644 --- a/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems +++ b/src/Humanizer.Tests.Shared/Humanizer.Tests.Shared.projitems @@ -25,6 +25,7 @@ + @@ -36,6 +37,7 @@ + diff --git a/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs b/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs index 4f341c3e4..3b424939f 100644 --- a/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs +++ b/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs @@ -30,30 +30,6 @@ public void ConvertToClockNotationTimeOnlyStringEnUs(int hours, int minutes, str var actualResult = new TimeOnly(hours, minutes).ToClockNotation(); Assert.Equal(expectedResult, actualResult); } - - [UseCulture("pt-BR")] - [Theory] - [InlineData(00, 00, "meia-noite")] - [InlineData(04, 00, "quatro em ponto")] - [InlineData(05, 01, "cinco e um")] - [InlineData(06, 05, "seis e cinco")] - [InlineData(07, 10, "sete e dez")] - [InlineData(08, 15, "oito e quinze")] - [InlineData(09, 20, "nove e vinte")] - [InlineData(10, 25, "dez e vinte e cinco")] - [InlineData(11, 30, "onze e meia")] - [InlineData(12, 00, "meio-dia")] - [InlineData(15, 35, "três e trinta e cinco")] - [InlineData(16, 40, "vinte para as cinco")] - [InlineData(17, 45, "quinze para as seis")] - [InlineData(18, 50, "dez para as sete")] - [InlineData(19, 55, "cinco para as oito")] - [InlineData(20, 59, "oito e cinquenta e nove")] - public void ConvertToClockNotationTimeOnlyStringPtBr(int hours, int minutes, string expectedResult) - { - var actualResult = new TimeOnly(hours, minutes).ToClockNotation(); - Assert.Equal(expectedResult, actualResult); - } } } diff --git a/src/Humanizer.Tests.Shared/Localisation/pt-BR/TimeToClockNotationTests.cs b/src/Humanizer.Tests.Shared/Localisation/pt-BR/TimeToClockNotationTests.cs new file mode 100644 index 000000000..c81c6237e --- /dev/null +++ b/src/Humanizer.Tests.Shared/Localisation/pt-BR/TimeToClockNotationTests.cs @@ -0,0 +1,36 @@ +#if NET6_0_OR_GREATER + +using System; +using Xunit; + +namespace Humanizer.Tests.Localisation.ptBR +{ + [UseCulture("pt-BR")] + public class TimeToClockNotationTests + { + [Theory] + [InlineData(00, 00, "meia-noite")] + [InlineData(04, 00, "quatro em ponto")] + [InlineData(05, 01, "cinco e um")] + [InlineData(06, 05, "seis e cinco")] + [InlineData(07, 10, "sete e dez")] + [InlineData(08, 15, "oito e quinze")] + [InlineData(09, 20, "nove e vinte")] + [InlineData(10, 25, "dez e vinte e cinco")] + [InlineData(11, 30, "onze e meia")] + [InlineData(12, 00, "meio-dia")] + [InlineData(15, 35, "três e trinta e cinco")] + [InlineData(16, 40, "vinte para as cinco")] + [InlineData(17, 45, "quinze para as seis")] + [InlineData(18, 50, "dez para as sete")] + [InlineData(19, 55, "cinco para as oito")] + [InlineData(20, 59, "oito e cinquenta e nove")] + public void ConvertToClockNotationTimeOnlyStringPtBr(int hours, int minutes, string expectedResult) + { + var actualResult = new TimeOnly(hours, minutes).ToClockNotation(); + Assert.Equal(expectedResult, actualResult); + } + } +} + +#endif diff --git a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.Approve_Public_Api.approved.txt.orig b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.Approve_Public_Api.approved.txt.orig deleted file mode 100644 index 4a1a9cb3c..000000000 --- a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.Approve_Public_Api.approved.txt.orig +++ /dev/null @@ -1,1955 +0,0 @@ -[assembly: System.Resources.NeutralResourcesLanguageAttribute("en")] -[assembly: System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName="")] -namespace Humanizer -{ - public class static ByteSizeExtensions - { - public static Humanizer.Bytes.ByteSize Bits(this byte input) { } - public static Humanizer.Bytes.ByteSize Bits(this sbyte input) { } - public static Humanizer.Bytes.ByteSize Bits(this short input) { } - public static Humanizer.Bytes.ByteSize Bits(this ushort input) { } - public static Humanizer.Bytes.ByteSize Bits(this int input) { } - public static Humanizer.Bytes.ByteSize Bits(this uint input) { } - public static Humanizer.Bytes.ByteSize Bits(this long input) { } - public static Humanizer.Bytes.ByteSize Bytes(this byte input) { } - public static Humanizer.Bytes.ByteSize Bytes(this sbyte input) { } - public static Humanizer.Bytes.ByteSize Bytes(this short input) { } - public static Humanizer.Bytes.ByteSize Bytes(this ushort input) { } - public static Humanizer.Bytes.ByteSize Bytes(this int input) { } - public static Humanizer.Bytes.ByteSize Bytes(this uint input) { } - public static Humanizer.Bytes.ByteSize Bytes(this double input) { } - public static Humanizer.Bytes.ByteSize Bytes(this long input) { } - public static Humanizer.Bytes.ByteSize Gigabytes(this byte input) { } - public static Humanizer.Bytes.ByteSize Gigabytes(this sbyte input) { } - public static Humanizer.Bytes.ByteSize Gigabytes(this short input) { } - public static Humanizer.Bytes.ByteSize Gigabytes(this ushort input) { } - public static Humanizer.Bytes.ByteSize Gigabytes(this int input) { } - public static Humanizer.Bytes.ByteSize Gigabytes(this uint input) { } - public static Humanizer.Bytes.ByteSize Gigabytes(this double input) { } - public static Humanizer.Bytes.ByteSize Gigabytes(this long input) { } - public static string Humanize(this Humanizer.Bytes.ByteSize input, string format = null) { } - public static string Humanize(this Humanizer.Bytes.ByteSize input, System.IFormatProvider formatProvider) { } - public static string Humanize(this Humanizer.Bytes.ByteSize input, string format, System.IFormatProvider formatProvider) { } - public static Humanizer.Bytes.ByteSize Kilobytes(this byte input) { } - public static Humanizer.Bytes.ByteSize Kilobytes(this sbyte input) { } - public static Humanizer.Bytes.ByteSize Kilobytes(this short input) { } - public static Humanizer.Bytes.ByteSize Kilobytes(this ushort input) { } - public static Humanizer.Bytes.ByteSize Kilobytes(this int input) { } - public static Humanizer.Bytes.ByteSize Kilobytes(this uint input) { } - public static Humanizer.Bytes.ByteSize Kilobytes(this double input) { } - public static Humanizer.Bytes.ByteSize Kilobytes(this long input) { } - public static Humanizer.Bytes.ByteSize Megabytes(this byte input) { } - public static Humanizer.Bytes.ByteSize Megabytes(this sbyte input) { } - public static Humanizer.Bytes.ByteSize Megabytes(this short input) { } - public static Humanizer.Bytes.ByteSize Megabytes(this ushort input) { } - public static Humanizer.Bytes.ByteSize Megabytes(this int input) { } - public static Humanizer.Bytes.ByteSize Megabytes(this uint input) { } - public static Humanizer.Bytes.ByteSize Megabytes(this double input) { } - public static Humanizer.Bytes.ByteSize Megabytes(this long input) { } - public static Humanizer.Bytes.ByteRate Per(this Humanizer.Bytes.ByteSize size, System.TimeSpan interval) { } - public static Humanizer.Bytes.ByteSize Terabytes(this byte input) { } - public static Humanizer.Bytes.ByteSize Terabytes(this sbyte input) { } - public static Humanizer.Bytes.ByteSize Terabytes(this short input) { } - public static Humanizer.Bytes.ByteSize Terabytes(this ushort input) { } - public static Humanizer.Bytes.ByteSize Terabytes(this int input) { } - public static Humanizer.Bytes.ByteSize Terabytes(this uint input) { } - public static Humanizer.Bytes.ByteSize Terabytes(this double input) { } - public static Humanizer.Bytes.ByteSize Terabytes(this long input) { } - } - public class static CasingExtensions - { - public static string ApplyCase(this string input, Humanizer.LetterCasing casing) { } - } - public class static CollectionHumanizeExtensions - { - public static string Humanize(this System.Collections.Generic.IEnumerable collection) { } - public static string Humanize(this System.Collections.Generic.IEnumerable collection, System.Func displayFormatter) { } - public static string Humanize(this System.Collections.Generic.IEnumerable collection, System.Func displayFormatter) { } - public static string Humanize(this System.Collections.Generic.IEnumerable collection, string separator) { } - public static string Humanize(this System.Collections.Generic.IEnumerable collection, System.Func displayFormatter, string separator) { } - public static string Humanize(this System.Collections.Generic.IEnumerable collection, System.Func displayFormatter, string separator) { } - } - public class static DateHumanizeExtensions - { - public static string Humanize(this System.DateTime input, System.Nullable utcDate = null, System.Nullable dateToCompareAgainst = null, System.Globalization.CultureInfo culture = null) { } - public static string Humanize(this System.Nullable input, System.Nullable utcDate = null, System.Nullable dateToCompareAgainst = null, System.Globalization.CultureInfo culture = null) { } - public static string Humanize(this System.DateTimeOffset input, System.Nullable dateToCompareAgainst = null, System.Globalization.CultureInfo culture = null) { } - public static string Humanize(this System.Nullable input, System.Nullable dateToCompareAgainst = null, System.Globalization.CultureInfo culture = null) { } - public static string Humanize(this System.DateOnly input, System.Nullable dateToCompareAgainst = null, System.Globalization.CultureInfo culture = null) { } - public static string Humanize(this System.Nullable input, System.Nullable dateToCompareAgainst = null, System.Globalization.CultureInfo culture = null) { } - public static string Humanize(this System.TimeOnly input, System.Nullable timeToCompareAgainst = null, bool useUtc = True, System.Globalization.CultureInfo culture = null) { } - public static string Humanize(this System.Nullable input, System.Nullable timeToCompareAgainst = null, bool useUtc = True, System.Globalization.CultureInfo culture = null) { } - } - public class static DateToOrdinalWordsExtensions - { - public static string ToOrdinalWords(this System.DateTime input) { } - public static string ToOrdinalWords(this System.DateTime input, Humanizer.GrammaticalCase grammaticalCase) { } - public static string ToOrdinalWords(this System.DateOnly input) { } - public static string ToOrdinalWords(this System.DateOnly input, Humanizer.GrammaticalCase grammaticalCase) { } - } - public class static EnglishArticle - { - public static string[] AppendArticlePrefix(string[] items) { } - public static string[] PrependArticleSuffix(string[] appended) { } - } - public enum EnglishArticles - { - A = 0, - An = 1, - The = 2, - } - public class static EnumDehumanizeExtensions - { - public static TTargetEnum DehumanizeTo(this string input) - where TTargetEnum : struct, System.IComparable, System.IFormattable { } - public static System.Enum DehumanizeTo(this string input, System.Type targetEnum, Humanizer.OnNoMatch onNoMatch = 0) { } - } - public class static EnumHumanizeExtensions - { - public static string Humanize(this System.Enum input) { } - public static string Humanize(this System.Enum input, Humanizer.LetterCasing casing) { } - } - public enum GrammaticalCase - { - Nominative = 0, - Genitive = 1, - Dative = 2, - Accusative = 3, - Instrumental = 4, - Prepositional = 5, - } - public enum GrammaticalGender - { - Masculine = 0, - Feminine = 1, - Neuter = 2, - } - public class static HeadingExtensions - { - public static double FromAbbreviatedHeading(this string heading) { } - public static double FromAbbreviatedHeading(this string heading, System.Globalization.CultureInfo culture = null) { } - public static double FromHeadingArrow(this char heading) { } - public static double FromHeadingArrow(this string heading) { } - public static string ToHeading(this double heading, Humanizer.HeadingStyle style = 0, System.Globalization.CultureInfo culture = null) { } - public static char ToHeadingArrow(this double heading) { } - } - public enum HeadingStyle - { - Abbreviated = 0, - Full = 1, - } - public interface ICulturedStringTransformer : Humanizer.IStringTransformer - { - string Transform(string input, System.Globalization.CultureInfo culture); - } - public interface IStringTransformer - { - string Transform(string input); - } - public interface ITruncator - { - string Truncate(string value, int length, string truncationString, Humanizer.TruncateFrom truncateFrom = 1); - } - public class In - { - public In() { } - public static System.DateTime April { get; } - public static System.DateTime August { get; } - public static System.DateTime December { get; } - public static System.DateTime February { get; } - public static System.DateTime January { get; } - public static System.DateTime July { get; } - public static System.DateTime June { get; } - public static System.DateTime March { get; } - public static System.DateTime May { get; } - public static System.DateTime November { get; } - public static System.DateTime October { get; } - public static System.DateTime September { get; } - public static System.DateTime AprilOf(int year) { } - public static System.DateTime AugustOf(int year) { } - public static System.DateTime DecemberOf(int year) { } - public static System.DateTime FebruaryOf(int year) { } - public static System.DateTime JanuaryOf(int year) { } - public static System.DateTime JulyOf(int year) { } - public static System.DateTime JuneOf(int year) { } - public static System.DateTime MarchOf(int year) { } - public static System.DateTime MayOf(int year) { } - public static System.DateTime NovemberOf(int year) { } - public static System.DateTime OctoberOf(int year) { } - public static System.DateTime SeptemberOf(int year) { } - public static System.DateTime TheYear(int year) { } - public class static Eight - { - public static System.DateTime Days { get; } - public static System.DateTime Hours { get; } - public static System.DateTime Minutes { get; } - public static System.DateTime Months { get; } - public static System.DateTime Seconds { get; } - public static System.DateTime Weeks { get; } - public static System.DateTime Years { get; } - public static System.DateTime DaysFrom(System.DateTime date) { } - public static System.DateTime HoursFrom(System.DateTime date) { } - public static System.DateTime MinutesFrom(System.DateTime date) { } - public static System.DateTime MonthsFrom(System.DateTime date) { } - public static System.DateTime SecondsFrom(System.DateTime date) { } - public static System.DateTime WeeksFrom(System.DateTime date) { } - public static System.DateTime YearsFrom(System.DateTime date) { } - } - public class static Five - { - public static System.DateTime Days { get; } - public static System.DateTime Hours { get; } - public static System.DateTime Minutes { get; } - public static System.DateTime Months { get; } - public static System.DateTime Seconds { get; } - public static System.DateTime Weeks { get; } - public static System.DateTime Years { get; } - public static System.DateTime DaysFrom(System.DateTime date) { } - public static System.DateTime HoursFrom(System.DateTime date) { } - public static System.DateTime MinutesFrom(System.DateTime date) { } - public static System.DateTime MonthsFrom(System.DateTime date) { } - public static System.DateTime SecondsFrom(System.DateTime date) { } - public static System.DateTime WeeksFrom(System.DateTime date) { } - public static System.DateTime YearsFrom(System.DateTime date) { } - } - public class static Four - { - public static System.DateTime Days { get; } - public static System.DateTime Hours { get; } - public static System.DateTime Minutes { get; } - public static System.DateTime Months { get; } - public static System.DateTime Seconds { get; } - public static System.DateTime Weeks { get; } - public static System.DateTime Years { get; } - public static System.DateTime DaysFrom(System.DateTime date) { } - public static System.DateTime HoursFrom(System.DateTime date) { } - public static System.DateTime MinutesFrom(System.DateTime date) { } - public static System.DateTime MonthsFrom(System.DateTime date) { } - public static System.DateTime SecondsFrom(System.DateTime date) { } - public static System.DateTime WeeksFrom(System.DateTime date) { } - public static System.DateTime YearsFrom(System.DateTime date) { } - } - public class static Nine - { - public static System.DateTime Days { get; } - public static System.DateTime Hours { get; } - public static System.DateTime Minutes { get; } - public static System.DateTime Months { get; } - public static System.DateTime Seconds { get; } - public static System.DateTime Weeks { get; } - public static System.DateTime Years { get; } - public static System.DateTime DaysFrom(System.DateTime date) { } - public static System.DateTime HoursFrom(System.DateTime date) { } - public static System.DateTime MinutesFrom(System.DateTime date) { } - public static System.DateTime MonthsFrom(System.DateTime date) { } - public static System.DateTime SecondsFrom(System.DateTime date) { } - public static System.DateTime WeeksFrom(System.DateTime date) { } - public static System.DateTime YearsFrom(System.DateTime date) { } - } - public class static One - { - public static System.DateTime Day { get; } - public static System.DateTime Hour { get; } - public static System.DateTime Minute { get; } - public static System.DateTime Month { get; } - public static System.DateTime Second { get; } - public static System.DateTime Week { get; } - public static System.DateTime Year { get; } - public static System.DateTime DayFrom(System.DateTime date) { } - public static System.DateTime HourFrom(System.DateTime date) { } - public static System.DateTime MinuteFrom(System.DateTime date) { } - public static System.DateTime MonthFrom(System.DateTime date) { } - public static System.DateTime SecondFrom(System.DateTime date) { } - public static System.DateTime WeekFrom(System.DateTime date) { } - public static System.DateTime YearFrom(System.DateTime date) { } - } - public class static Seven - { - public static System.DateTime Days { get; } - public static System.DateTime Hours { get; } - public static System.DateTime Minutes { get; } - public static System.DateTime Months { get; } - public static System.DateTime Seconds { get; } - public static System.DateTime Weeks { get; } - public static System.DateTime Years { get; } - public static System.DateTime DaysFrom(System.DateTime date) { } - public static System.DateTime HoursFrom(System.DateTime date) { } - public static System.DateTime MinutesFrom(System.DateTime date) { } - public static System.DateTime MonthsFrom(System.DateTime date) { } - public static System.DateTime SecondsFrom(System.DateTime date) { } - public static System.DateTime WeeksFrom(System.DateTime date) { } - public static System.DateTime YearsFrom(System.DateTime date) { } - } - public class static Six - { - public static System.DateTime Days { get; } - public static System.DateTime Hours { get; } - public static System.DateTime Minutes { get; } - public static System.DateTime Months { get; } - public static System.DateTime Seconds { get; } - public static System.DateTime Weeks { get; } - public static System.DateTime Years { get; } - public static System.DateTime DaysFrom(System.DateTime date) { } - public static System.DateTime HoursFrom(System.DateTime date) { } - public static System.DateTime MinutesFrom(System.DateTime date) { } - public static System.DateTime MonthsFrom(System.DateTime date) { } - public static System.DateTime SecondsFrom(System.DateTime date) { } - public static System.DateTime WeeksFrom(System.DateTime date) { } - public static System.DateTime YearsFrom(System.DateTime date) { } - } - public class static Ten - { - public static System.DateTime Days { get; } - public static System.DateTime Hours { get; } - public static System.DateTime Minutes { get; } - public static System.DateTime Months { get; } - public static System.DateTime Seconds { get; } - public static System.DateTime Weeks { get; } - public static System.DateTime Years { get; } - public static System.DateTime DaysFrom(System.DateTime date) { } - public static System.DateTime HoursFrom(System.DateTime date) { } - public static System.DateTime MinutesFrom(System.DateTime date) { } - public static System.DateTime MonthsFrom(System.DateTime date) { } - public static System.DateTime SecondsFrom(System.DateTime date) { } - public static System.DateTime WeeksFrom(System.DateTime date) { } - public static System.DateTime YearsFrom(System.DateTime date) { } - } - public class static Three - { - public static System.DateTime Days { get; } - public static System.DateTime Hours { get; } - public static System.DateTime Minutes { get; } - public static System.DateTime Months { get; } - public static System.DateTime Seconds { get; } - public static System.DateTime Weeks { get; } - public static System.DateTime Years { get; } - public static System.DateTime DaysFrom(System.DateTime date) { } - public static System.DateTime HoursFrom(System.DateTime date) { } - public static System.DateTime MinutesFrom(System.DateTime date) { } - public static System.DateTime MonthsFrom(System.DateTime date) { } - public static System.DateTime SecondsFrom(System.DateTime date) { } - public static System.DateTime WeeksFrom(System.DateTime date) { } - public static System.DateTime YearsFrom(System.DateTime date) { } - } - public class static Two - { - public static System.DateTime Days { get; } - public static System.DateTime Hours { get; } - public static System.DateTime Minutes { get; } - public static System.DateTime Months { get; } - public static System.DateTime Seconds { get; } - public static System.DateTime Weeks { get; } - public static System.DateTime Years { get; } - public static System.DateTime DaysFrom(System.DateTime date) { } - public static System.DateTime HoursFrom(System.DateTime date) { } - public static System.DateTime MinutesFrom(System.DateTime date) { } - public static System.DateTime MonthsFrom(System.DateTime date) { } - public static System.DateTime SecondsFrom(System.DateTime date) { } - public static System.DateTime WeeksFrom(System.DateTime date) { } - public static System.DateTime YearsFrom(System.DateTime date) { } - } - } - public class InDate - { - public InDate() { } - public static System.DateOnly April { get; } - public static System.DateOnly August { get; } - public static System.DateOnly December { get; } - public static System.DateOnly February { get; } - public static System.DateOnly January { get; } - public static System.DateOnly July { get; } - public static System.DateOnly June { get; } - public static System.DateOnly March { get; } - public static System.DateOnly May { get; } - public static System.DateOnly November { get; } - public static System.DateOnly October { get; } - public static System.DateOnly September { get; } - public static System.DateOnly AprilOf(int year) { } - public static System.DateOnly AugustOf(int year) { } - public static System.DateOnly DecemberOf(int year) { } - public static System.DateOnly FebruaryOf(int year) { } - public static System.DateOnly JanuaryOf(int year) { } - public static System.DateOnly JulyOf(int year) { } - public static System.DateOnly JuneOf(int year) { } - public static System.DateOnly MarchOf(int year) { } - public static System.DateOnly MayOf(int year) { } - public static System.DateOnly NovemberOf(int year) { } - public static System.DateOnly OctoberOf(int year) { } - public static System.DateOnly SeptemberOf(int year) { } - public static System.DateOnly TheYear(int year) { } - public class static Eight - { - public static System.DateOnly Days { get; } - public static System.DateOnly Months { get; } - public static System.DateOnly Weeks { get; } - public static System.DateOnly Years { get; } - public static System.DateOnly DaysFrom(System.DateOnly date) { } - public static System.DateOnly DaysFrom(System.DateTime date) { } - public static System.DateOnly MonthsFrom(System.DateOnly date) { } - public static System.DateOnly MonthsFrom(System.DateTime date) { } - public static System.DateOnly WeeksFrom(System.DateOnly date) { } - public static System.DateOnly WeeksFrom(System.DateTime date) { } - public static System.DateOnly YearsFrom(System.DateOnly date) { } - public static System.DateOnly YearsFrom(System.DateTime date) { } - } - public class static Five - { - public static System.DateOnly Days { get; } - public static System.DateOnly Months { get; } - public static System.DateOnly Weeks { get; } - public static System.DateOnly Years { get; } - public static System.DateOnly DaysFrom(System.DateOnly date) { } - public static System.DateOnly DaysFrom(System.DateTime date) { } - public static System.DateOnly MonthsFrom(System.DateOnly date) { } - public static System.DateOnly MonthsFrom(System.DateTime date) { } - public static System.DateOnly WeeksFrom(System.DateOnly date) { } - public static System.DateOnly WeeksFrom(System.DateTime date) { } - public static System.DateOnly YearsFrom(System.DateOnly date) { } - public static System.DateOnly YearsFrom(System.DateTime date) { } - } - public class static Four - { - public static System.DateOnly Days { get; } - public static System.DateOnly Months { get; } - public static System.DateOnly Weeks { get; } - public static System.DateOnly Years { get; } - public static System.DateOnly DaysFrom(System.DateOnly date) { } - public static System.DateOnly DaysFrom(System.DateTime date) { } - public static System.DateOnly MonthsFrom(System.DateOnly date) { } - public static System.DateOnly MonthsFrom(System.DateTime date) { } - public static System.DateOnly WeeksFrom(System.DateOnly date) { } - public static System.DateOnly WeeksFrom(System.DateTime date) { } - public static System.DateOnly YearsFrom(System.DateOnly date) { } - public static System.DateOnly YearsFrom(System.DateTime date) { } - } - public class static Nine - { - public static System.DateOnly Days { get; } - public static System.DateOnly Months { get; } - public static System.DateOnly Weeks { get; } - public static System.DateOnly Years { get; } - public static System.DateOnly DaysFrom(System.DateOnly date) { } - public static System.DateOnly DaysFrom(System.DateTime date) { } - public static System.DateOnly MonthsFrom(System.DateOnly date) { } - public static System.DateOnly MonthsFrom(System.DateTime date) { } - public static System.DateOnly WeeksFrom(System.DateOnly date) { } - public static System.DateOnly WeeksFrom(System.DateTime date) { } - public static System.DateOnly YearsFrom(System.DateOnly date) { } - public static System.DateOnly YearsFrom(System.DateTime date) { } - } - public class static One - { - public static System.DateOnly Day { get; } - public static System.DateOnly Month { get; } - public static System.DateOnly Week { get; } - public static System.DateOnly Year { get; } - public static System.DateOnly DayFrom(System.DateOnly date) { } - public static System.DateOnly DayFrom(System.DateTime date) { } - public static System.DateOnly MonthFrom(System.DateOnly date) { } - public static System.DateOnly MonthFrom(System.DateTime date) { } - public static System.DateOnly WeekFrom(System.DateOnly date) { } - public static System.DateOnly WeekFrom(System.DateTime date) { } - public static System.DateOnly YearFrom(System.DateOnly date) { } - public static System.DateOnly YearFrom(System.DateTime date) { } - } - public class static Seven - { - public static System.DateOnly Days { get; } - public static System.DateOnly Months { get; } - public static System.DateOnly Weeks { get; } - public static System.DateOnly Years { get; } - public static System.DateOnly DaysFrom(System.DateOnly date) { } - public static System.DateOnly DaysFrom(System.DateTime date) { } - public static System.DateOnly MonthsFrom(System.DateOnly date) { } - public static System.DateOnly MonthsFrom(System.DateTime date) { } - public static System.DateOnly WeeksFrom(System.DateOnly date) { } - public static System.DateOnly WeeksFrom(System.DateTime date) { } - public static System.DateOnly YearsFrom(System.DateOnly date) { } - public static System.DateOnly YearsFrom(System.DateTime date) { } - } - public class static Six - { - public static System.DateOnly Days { get; } - public static System.DateOnly Months { get; } - public static System.DateOnly Weeks { get; } - public static System.DateOnly Years { get; } - public static System.DateOnly DaysFrom(System.DateOnly date) { } - public static System.DateOnly DaysFrom(System.DateTime date) { } - public static System.DateOnly MonthsFrom(System.DateOnly date) { } - public static System.DateOnly MonthsFrom(System.DateTime date) { } - public static System.DateOnly WeeksFrom(System.DateOnly date) { } - public static System.DateOnly WeeksFrom(System.DateTime date) { } - public static System.DateOnly YearsFrom(System.DateOnly date) { } - public static System.DateOnly YearsFrom(System.DateTime date) { } - } - public class static Ten - { - public static System.DateOnly Days { get; } - public static System.DateOnly Months { get; } - public static System.DateOnly Weeks { get; } - public static System.DateOnly Years { get; } - public static System.DateOnly DaysFrom(System.DateOnly date) { } - public static System.DateOnly DaysFrom(System.DateTime date) { } - public static System.DateOnly MonthsFrom(System.DateOnly date) { } - public static System.DateOnly MonthsFrom(System.DateTime date) { } - public static System.DateOnly WeeksFrom(System.DateOnly date) { } - public static System.DateOnly WeeksFrom(System.DateTime date) { } - public static System.DateOnly YearsFrom(System.DateOnly date) { } - public static System.DateOnly YearsFrom(System.DateTime date) { } - } - public class static Three - { - public static System.DateOnly Days { get; } - public static System.DateOnly Months { get; } - public static System.DateOnly Weeks { get; } - public static System.DateOnly Years { get; } - public static System.DateOnly DaysFrom(System.DateOnly date) { } - public static System.DateOnly DaysFrom(System.DateTime date) { } - public static System.DateOnly MonthsFrom(System.DateOnly date) { } - public static System.DateOnly MonthsFrom(System.DateTime date) { } - public static System.DateOnly WeeksFrom(System.DateOnly date) { } - public static System.DateOnly WeeksFrom(System.DateTime date) { } - public static System.DateOnly YearsFrom(System.DateOnly date) { } - public static System.DateOnly YearsFrom(System.DateTime date) { } - } - public class static Two - { - public static System.DateOnly Days { get; } - public static System.DateOnly Months { get; } - public static System.DateOnly Weeks { get; } - public static System.DateOnly Years { get; } - public static System.DateOnly DaysFrom(System.DateOnly date) { } - public static System.DateOnly DaysFrom(System.DateTime date) { } - public static System.DateOnly MonthsFrom(System.DateOnly date) { } - public static System.DateOnly MonthsFrom(System.DateTime date) { } - public static System.DateOnly WeeksFrom(System.DateOnly date) { } - public static System.DateOnly WeeksFrom(System.DateTime date) { } - public static System.DateOnly YearsFrom(System.DateOnly date) { } - public static System.DateOnly YearsFrom(System.DateTime date) { } - } - } - public class static InflectorExtensions - { - public static string Camelize(this string input) { } - public static string Dasherize(this string underscoredWord) { } - public static string Hyphenate(this string underscoredWord) { } - public static string Kebaberize(this string input) { } - public static string Pascalize(this string input) { } - public static string Pluralize(this string word, bool inputIsKnownToBeSingular = True) { } - public static string Singularize(this string word, bool inputIsKnownToBePlural = True, bool skipSimpleWords = False) { } - public static string Titleize(this string input) { } - public static string Underscore(this string input) { } - } - public enum LetterCasing - { - Title = 0, - AllCaps = 1, - LowerCase = 2, - Sentence = 3, - } - public class static MetricNumeralExtensions - { - public static double FromMetric(this string input) { } - [System.ObsoleteAttribute("Please use overload with MetricNumeralFormats")] - public static string ToMetric(this int input, bool hasSpace, bool useSymbol = True, System.Nullable decimals = null) { } - public static string ToMetric(this int input, System.Nullable formats = null, System.Nullable decimals = null) { } - [System.ObsoleteAttribute("Please use overload with MetricNumeralFormats")] - public static string ToMetric(this double input, bool hasSpace, bool useSymbol = True, System.Nullable decimals = null) { } - public static string ToMetric(this double input, System.Nullable formats = null, System.Nullable decimals = null) { } - } - [System.FlagsAttribute()] - public enum MetricNumeralFormats - { - UseLongScaleWord = 1, - UseName = 2, - UseShortScaleWord = 4, - WithSpace = 8, - } - public class NoMatchFoundException : System.Exception - { - public NoMatchFoundException() { } - public NoMatchFoundException(string message) { } - public NoMatchFoundException(string message, System.Exception inner) { } - } - public class static NumberToNumberExtensions - { - public static int Billions(this int input) { } - public static uint Billions(this uint input) { } - public static long Billions(this long input) { } - public static ulong Billions(this ulong input) { } - public static double Billions(this double input) { } - public static int Hundreds(this int input) { } - public static uint Hundreds(this uint input) { } - public static long Hundreds(this long input) { } - public static ulong Hundreds(this ulong input) { } - public static double Hundreds(this double input) { } - public static int Millions(this int input) { } - public static uint Millions(this uint input) { } - public static long Millions(this long input) { } - public static ulong Millions(this ulong input) { } - public static double Millions(this double input) { } - public static int Tens(this int input) { } - public static uint Tens(this uint input) { } - public static long Tens(this long input) { } - public static ulong Tens(this ulong input) { } - public static double Tens(this double input) { } - public static int Thousands(this int input) { } - public static uint Thousands(this uint input) { } - public static long Thousands(this long input) { } - public static ulong Thousands(this ulong input) { } - public static double Thousands(this double input) { } - } - public class static NumberToTimeSpanExtensions - { - public static System.TimeSpan Days(this byte days) { } - public static System.TimeSpan Days(this sbyte days) { } - public static System.TimeSpan Days(this short days) { } - public static System.TimeSpan Days(this ushort days) { } - public static System.TimeSpan Days(this int days) { } - public static System.TimeSpan Days(this uint days) { } - public static System.TimeSpan Days(this long days) { } - public static System.TimeSpan Days(this ulong days) { } - public static System.TimeSpan Days(this double days) { } - public static System.TimeSpan Hours(this byte hours) { } - public static System.TimeSpan Hours(this sbyte hours) { } - public static System.TimeSpan Hours(this short hours) { } - public static System.TimeSpan Hours(this ushort hours) { } - public static System.TimeSpan Hours(this int hours) { } - public static System.TimeSpan Hours(this uint hours) { } - public static System.TimeSpan Hours(this long hours) { } - public static System.TimeSpan Hours(this ulong hours) { } - public static System.TimeSpan Hours(this double hours) { } - public static System.TimeSpan Milliseconds(this byte ms) { } - public static System.TimeSpan Milliseconds(this sbyte ms) { } - public static System.TimeSpan Milliseconds(this short ms) { } - public static System.TimeSpan Milliseconds(this ushort ms) { } - public static System.TimeSpan Milliseconds(this int ms) { } - public static System.TimeSpan Milliseconds(this uint ms) { } - public static System.TimeSpan Milliseconds(this long ms) { } - public static System.TimeSpan Milliseconds(this ulong ms) { } - public static System.TimeSpan Milliseconds(this double ms) { } - public static System.TimeSpan Minutes(this byte minutes) { } - public static System.TimeSpan Minutes(this sbyte minutes) { } - public static System.TimeSpan Minutes(this short minutes) { } - public static System.TimeSpan Minutes(this ushort minutes) { } - public static System.TimeSpan Minutes(this int minutes) { } - public static System.TimeSpan Minutes(this uint minutes) { } - public static System.TimeSpan Minutes(this long minutes) { } - public static System.TimeSpan Minutes(this ulong minutes) { } - public static System.TimeSpan Minutes(this double minutes) { } - public static System.TimeSpan Seconds(this byte seconds) { } - public static System.TimeSpan Seconds(this sbyte seconds) { } - public static System.TimeSpan Seconds(this short seconds) { } - public static System.TimeSpan Seconds(this ushort seconds) { } - public static System.TimeSpan Seconds(this int seconds) { } - public static System.TimeSpan Seconds(this uint seconds) { } - public static System.TimeSpan Seconds(this long seconds) { } - public static System.TimeSpan Seconds(this ulong seconds) { } - public static System.TimeSpan Seconds(this double seconds) { } - public static System.TimeSpan Weeks(this byte input) { } - public static System.TimeSpan Weeks(this sbyte input) { } - public static System.TimeSpan Weeks(this short input) { } - public static System.TimeSpan Weeks(this ushort input) { } - public static System.TimeSpan Weeks(this int input) { } - public static System.TimeSpan Weeks(this uint input) { } - public static System.TimeSpan Weeks(this long input) { } - public static System.TimeSpan Weeks(this ulong input) { } - public static System.TimeSpan Weeks(this double input) { } - } - public class static NumberToWordsExtension - { - public static string ToOrdinalWords(this int number, System.Globalization.CultureInfo culture = null) { } - public static string ToOrdinalWords(this int number, Humanizer.GrammaticalGender gender, System.Globalization.CultureInfo culture = null) { } - public static string ToTuple(this int number, System.Globalization.CultureInfo culture = null) { } - public static string ToWords(this int number, System.Globalization.CultureInfo culture = null) { } - public static string ToWords(this int number, bool addAnd, System.Globalization.CultureInfo culture = null) { } - public static string ToWords(this int number, Humanizer.GrammaticalGender gender, System.Globalization.CultureInfo culture = null) { } - public static string ToWords(this long number, System.Globalization.CultureInfo culture = null, bool addAnd = True) { } - public static string ToWords(this long number, Humanizer.GrammaticalGender gender, System.Globalization.CultureInfo culture = null) { } - } - public class On - { - public On() { } - public class April - { - public April() { } - public static System.DateTime The10th { get; } - public static System.DateTime The11th { get; } - public static System.DateTime The12th { get; } - public static System.DateTime The13th { get; } - public static System.DateTime The14th { get; } - public static System.DateTime The15th { get; } - public static System.DateTime The16th { get; } - public static System.DateTime The17th { get; } - public static System.DateTime The18th { get; } - public static System.DateTime The19th { get; } - public static System.DateTime The1st { get; } - public static System.DateTime The20th { get; } - public static System.DateTime The21st { get; } - public static System.DateTime The22nd { get; } - public static System.DateTime The23rd { get; } - public static System.DateTime The24th { get; } - public static System.DateTime The25th { get; } - public static System.DateTime The26th { get; } - public static System.DateTime The27th { get; } - public static System.DateTime The28th { get; } - public static System.DateTime The29th { get; } - public static System.DateTime The2nd { get; } - public static System.DateTime The30th { get; } - public static System.DateTime The3rd { get; } - public static System.DateTime The4th { get; } - public static System.DateTime The5th { get; } - public static System.DateTime The6th { get; } - public static System.DateTime The7th { get; } - public static System.DateTime The8th { get; } - public static System.DateTime The9th { get; } - public static System.DateTime The(int dayNumber) { } - } - public class August - { - public August() { } - public static System.DateTime The10th { get; } - public static System.DateTime The11th { get; } - public static System.DateTime The12th { get; } - public static System.DateTime The13th { get; } - public static System.DateTime The14th { get; } - public static System.DateTime The15th { get; } - public static System.DateTime The16th { get; } - public static System.DateTime The17th { get; } - public static System.DateTime The18th { get; } - public static System.DateTime The19th { get; } - public static System.DateTime The1st { get; } - public static System.DateTime The20th { get; } - public static System.DateTime The21st { get; } - public static System.DateTime The22nd { get; } - public static System.DateTime The23rd { get; } - public static System.DateTime The24th { get; } - public static System.DateTime The25th { get; } - public static System.DateTime The26th { get; } - public static System.DateTime The27th { get; } - public static System.DateTime The28th { get; } - public static System.DateTime The29th { get; } - public static System.DateTime The2nd { get; } - public static System.DateTime The30th { get; } - public static System.DateTime The31st { get; } - public static System.DateTime The3rd { get; } - public static System.DateTime The4th { get; } - public static System.DateTime The5th { get; } - public static System.DateTime The6th { get; } - public static System.DateTime The7th { get; } - public static System.DateTime The8th { get; } - public static System.DateTime The9th { get; } - public static System.DateTime The(int dayNumber) { } - } - public class December - { - public December() { } - public static System.DateTime The10th { get; } - public static System.DateTime The11th { get; } - public static System.DateTime The12th { get; } - public static System.DateTime The13th { get; } - public static System.DateTime The14th { get; } - public static System.DateTime The15th { get; } - public static System.DateTime The16th { get; } - public static System.DateTime The17th { get; } - public static System.DateTime The18th { get; } - public static System.DateTime The19th { get; } - public static System.DateTime The1st { get; } - public static System.DateTime The20th { get; } - public static System.DateTime The21st { get; } - public static System.DateTime The22nd { get; } - public static System.DateTime The23rd { get; } - public static System.DateTime The24th { get; } - public static System.DateTime The25th { get; } - public static System.DateTime The26th { get; } - public static System.DateTime The27th { get; } - public static System.DateTime The28th { get; } - public static System.DateTime The29th { get; } - public static System.DateTime The2nd { get; } - public static System.DateTime The30th { get; } - public static System.DateTime The31st { get; } - public static System.DateTime The3rd { get; } - public static System.DateTime The4th { get; } - public static System.DateTime The5th { get; } - public static System.DateTime The6th { get; } - public static System.DateTime The7th { get; } - public static System.DateTime The8th { get; } - public static System.DateTime The9th { get; } - public static System.DateTime The(int dayNumber) { } - } - public class February - { - public February() { } - public static System.DateTime The10th { get; } - public static System.DateTime The11th { get; } - public static System.DateTime The12th { get; } - public static System.DateTime The13th { get; } - public static System.DateTime The14th { get; } - public static System.DateTime The15th { get; } - public static System.DateTime The16th { get; } - public static System.DateTime The17th { get; } - public static System.DateTime The18th { get; } - public static System.DateTime The19th { get; } - public static System.DateTime The1st { get; } - public static System.DateTime The20th { get; } - public static System.DateTime The21st { get; } - public static System.DateTime The22nd { get; } - public static System.DateTime The23rd { get; } - public static System.DateTime The24th { get; } - public static System.DateTime The25th { get; } - public static System.DateTime The26th { get; } - public static System.DateTime The27th { get; } - public static System.DateTime The28th { get; } - public static System.DateTime The29th { get; } - public static System.DateTime The2nd { get; } - public static System.DateTime The3rd { get; } - public static System.DateTime The4th { get; } - public static System.DateTime The5th { get; } - public static System.DateTime The6th { get; } - public static System.DateTime The7th { get; } - public static System.DateTime The8th { get; } - public static System.DateTime The9th { get; } - public static System.DateTime The(int dayNumber) { } - } - public class January - { - public January() { } - public static System.DateTime The10th { get; } - public static System.DateTime The11th { get; } - public static System.DateTime The12th { get; } - public static System.DateTime The13th { get; } - public static System.DateTime The14th { get; } - public static System.DateTime The15th { get; } - public static System.DateTime The16th { get; } - public static System.DateTime The17th { get; } - public static System.DateTime The18th { get; } - public static System.DateTime The19th { get; } - public static System.DateTime The1st { get; } - public static System.DateTime The20th { get; } - public static System.DateTime The21st { get; } - public static System.DateTime The22nd { get; } - public static System.DateTime The23rd { get; } - public static System.DateTime The24th { get; } - public static System.DateTime The25th { get; } - public static System.DateTime The26th { get; } - public static System.DateTime The27th { get; } - public static System.DateTime The28th { get; } - public static System.DateTime The29th { get; } - public static System.DateTime The2nd { get; } - public static System.DateTime The30th { get; } - public static System.DateTime The31st { get; } - public static System.DateTime The3rd { get; } - public static System.DateTime The4th { get; } - public static System.DateTime The5th { get; } - public static System.DateTime The6th { get; } - public static System.DateTime The7th { get; } - public static System.DateTime The8th { get; } - public static System.DateTime The9th { get; } - public static System.DateTime The(int dayNumber) { } - } - public class July - { - public July() { } - public static System.DateTime The10th { get; } - public static System.DateTime The11th { get; } - public static System.DateTime The12th { get; } - public static System.DateTime The13th { get; } - public static System.DateTime The14th { get; } - public static System.DateTime The15th { get; } - public static System.DateTime The16th { get; } - public static System.DateTime The17th { get; } - public static System.DateTime The18th { get; } - public static System.DateTime The19th { get; } - public static System.DateTime The1st { get; } - public static System.DateTime The20th { get; } - public static System.DateTime The21st { get; } - public static System.DateTime The22nd { get; } - public static System.DateTime The23rd { get; } - public static System.DateTime The24th { get; } - public static System.DateTime The25th { get; } - public static System.DateTime The26th { get; } - public static System.DateTime The27th { get; } - public static System.DateTime The28th { get; } - public static System.DateTime The29th { get; } - public static System.DateTime The2nd { get; } - public static System.DateTime The30th { get; } - public static System.DateTime The31st { get; } - public static System.DateTime The3rd { get; } - public static System.DateTime The4th { get; } - public static System.DateTime The5th { get; } - public static System.DateTime The6th { get; } - public static System.DateTime The7th { get; } - public static System.DateTime The8th { get; } - public static System.DateTime The9th { get; } - public static System.DateTime The(int dayNumber) { } - } - public class June - { - public June() { } - public static System.DateTime The10th { get; } - public static System.DateTime The11th { get; } - public static System.DateTime The12th { get; } - public static System.DateTime The13th { get; } - public static System.DateTime The14th { get; } - public static System.DateTime The15th { get; } - public static System.DateTime The16th { get; } - public static System.DateTime The17th { get; } - public static System.DateTime The18th { get; } - public static System.DateTime The19th { get; } - public static System.DateTime The1st { get; } - public static System.DateTime The20th { get; } - public static System.DateTime The21st { get; } - public static System.DateTime The22nd { get; } - public static System.DateTime The23rd { get; } - public static System.DateTime The24th { get; } - public static System.DateTime The25th { get; } - public static System.DateTime The26th { get; } - public static System.DateTime The27th { get; } - public static System.DateTime The28th { get; } - public static System.DateTime The29th { get; } - public static System.DateTime The2nd { get; } - public static System.DateTime The30th { get; } - public static System.DateTime The3rd { get; } - public static System.DateTime The4th { get; } - public static System.DateTime The5th { get; } - public static System.DateTime The6th { get; } - public static System.DateTime The7th { get; } - public static System.DateTime The8th { get; } - public static System.DateTime The9th { get; } - public static System.DateTime The(int dayNumber) { } - } - public class March - { - public March() { } - public static System.DateTime The10th { get; } - public static System.DateTime The11th { get; } - public static System.DateTime The12th { get; } - public static System.DateTime The13th { get; } - public static System.DateTime The14th { get; } - public static System.DateTime The15th { get; } - public static System.DateTime The16th { get; } - public static System.DateTime The17th { get; } - public static System.DateTime The18th { get; } - public static System.DateTime The19th { get; } - public static System.DateTime The1st { get; } - public static System.DateTime The20th { get; } - public static System.DateTime The21st { get; } - public static System.DateTime The22nd { get; } - public static System.DateTime The23rd { get; } - public static System.DateTime The24th { get; } - public static System.DateTime The25th { get; } - public static System.DateTime The26th { get; } - public static System.DateTime The27th { get; } - public static System.DateTime The28th { get; } - public static System.DateTime The29th { get; } - public static System.DateTime The2nd { get; } - public static System.DateTime The30th { get; } - public static System.DateTime The31st { get; } - public static System.DateTime The3rd { get; } - public static System.DateTime The4th { get; } - public static System.DateTime The5th { get; } - public static System.DateTime The6th { get; } - public static System.DateTime The7th { get; } - public static System.DateTime The8th { get; } - public static System.DateTime The9th { get; } - public static System.DateTime The(int dayNumber) { } - } - public class May - { - public May() { } - public static System.DateTime The10th { get; } - public static System.DateTime The11th { get; } - public static System.DateTime The12th { get; } - public static System.DateTime The13th { get; } - public static System.DateTime The14th { get; } - public static System.DateTime The15th { get; } - public static System.DateTime The16th { get; } - public static System.DateTime The17th { get; } - public static System.DateTime The18th { get; } - public static System.DateTime The19th { get; } - public static System.DateTime The1st { get; } - public static System.DateTime The20th { get; } - public static System.DateTime The21st { get; } - public static System.DateTime The22nd { get; } - public static System.DateTime The23rd { get; } - public static System.DateTime The24th { get; } - public static System.DateTime The25th { get; } - public static System.DateTime The26th { get; } - public static System.DateTime The27th { get; } - public static System.DateTime The28th { get; } - public static System.DateTime The29th { get; } - public static System.DateTime The2nd { get; } - public static System.DateTime The30th { get; } - public static System.DateTime The31st { get; } - public static System.DateTime The3rd { get; } - public static System.DateTime The4th { get; } - public static System.DateTime The5th { get; } - public static System.DateTime The6th { get; } - public static System.DateTime The7th { get; } - public static System.DateTime The8th { get; } - public static System.DateTime The9th { get; } - public static System.DateTime The(int dayNumber) { } - } - public class November - { - public November() { } - public static System.DateTime The10th { get; } - public static System.DateTime The11th { get; } - public static System.DateTime The12th { get; } - public static System.DateTime The13th { get; } - public static System.DateTime The14th { get; } - public static System.DateTime The15th { get; } - public static System.DateTime The16th { get; } - public static System.DateTime The17th { get; } - public static System.DateTime The18th { get; } - public static System.DateTime The19th { get; } - public static System.DateTime The1st { get; } - public static System.DateTime The20th { get; } - public static System.DateTime The21st { get; } - public static System.DateTime The22nd { get; } - public static System.DateTime The23rd { get; } - public static System.DateTime The24th { get; } - public static System.DateTime The25th { get; } - public static System.DateTime The26th { get; } - public static System.DateTime The27th { get; } - public static System.DateTime The28th { get; } - public static System.DateTime The29th { get; } - public static System.DateTime The2nd { get; } - public static System.DateTime The30th { get; } - public static System.DateTime The3rd { get; } - public static System.DateTime The4th { get; } - public static System.DateTime The5th { get; } - public static System.DateTime The6th { get; } - public static System.DateTime The7th { get; } - public static System.DateTime The8th { get; } - public static System.DateTime The9th { get; } - public static System.DateTime The(int dayNumber) { } - } - public class October - { - public October() { } - public static System.DateTime The10th { get; } - public static System.DateTime The11th { get; } - public static System.DateTime The12th { get; } - public static System.DateTime The13th { get; } - public static System.DateTime The14th { get; } - public static System.DateTime The15th { get; } - public static System.DateTime The16th { get; } - public static System.DateTime The17th { get; } - public static System.DateTime The18th { get; } - public static System.DateTime The19th { get; } - public static System.DateTime The1st { get; } - public static System.DateTime The20th { get; } - public static System.DateTime The21st { get; } - public static System.DateTime The22nd { get; } - public static System.DateTime The23rd { get; } - public static System.DateTime The24th { get; } - public static System.DateTime The25th { get; } - public static System.DateTime The26th { get; } - public static System.DateTime The27th { get; } - public static System.DateTime The28th { get; } - public static System.DateTime The29th { get; } - public static System.DateTime The2nd { get; } - public static System.DateTime The30th { get; } - public static System.DateTime The31st { get; } - public static System.DateTime The3rd { get; } - public static System.DateTime The4th { get; } - public static System.DateTime The5th { get; } - public static System.DateTime The6th { get; } - public static System.DateTime The7th { get; } - public static System.DateTime The8th { get; } - public static System.DateTime The9th { get; } - public static System.DateTime The(int dayNumber) { } - } - public class September - { - public September() { } - public static System.DateTime The10th { get; } - public static System.DateTime The11th { get; } - public static System.DateTime The12th { get; } - public static System.DateTime The13th { get; } - public static System.DateTime The14th { get; } - public static System.DateTime The15th { get; } - public static System.DateTime The16th { get; } - public static System.DateTime The17th { get; } - public static System.DateTime The18th { get; } - public static System.DateTime The19th { get; } - public static System.DateTime The1st { get; } - public static System.DateTime The20th { get; } - public static System.DateTime The21st { get; } - public static System.DateTime The22nd { get; } - public static System.DateTime The23rd { get; } - public static System.DateTime The24th { get; } - public static System.DateTime The25th { get; } - public static System.DateTime The26th { get; } - public static System.DateTime The27th { get; } - public static System.DateTime The28th { get; } - public static System.DateTime The29th { get; } - public static System.DateTime The2nd { get; } - public static System.DateTime The30th { get; } - public static System.DateTime The3rd { get; } - public static System.DateTime The4th { get; } - public static System.DateTime The5th { get; } - public static System.DateTime The6th { get; } - public static System.DateTime The7th { get; } - public static System.DateTime The8th { get; } - public static System.DateTime The9th { get; } - public static System.DateTime The(int dayNumber) { } - } - } - public class OnDate - { - public OnDate() { } - public class April - { - public April() { } - public static System.DateOnly The10th { get; } - public static System.DateOnly The11th { get; } - public static System.DateOnly The12th { get; } - public static System.DateOnly The13th { get; } - public static System.DateOnly The14th { get; } - public static System.DateOnly The15th { get; } - public static System.DateOnly The16th { get; } - public static System.DateOnly The17th { get; } - public static System.DateOnly The18th { get; } - public static System.DateOnly The19th { get; } - public static System.DateOnly The1st { get; } - public static System.DateOnly The20th { get; } - public static System.DateOnly The21st { get; } - public static System.DateOnly The22nd { get; } - public static System.DateOnly The23rd { get; } - public static System.DateOnly The24th { get; } - public static System.DateOnly The25th { get; } - public static System.DateOnly The26th { get; } - public static System.DateOnly The27th { get; } - public static System.DateOnly The28th { get; } - public static System.DateOnly The29th { get; } - public static System.DateOnly The2nd { get; } - public static System.DateOnly The30th { get; } - public static System.DateOnly The3rd { get; } - public static System.DateOnly The4th { get; } - public static System.DateOnly The5th { get; } - public static System.DateOnly The6th { get; } - public static System.DateOnly The7th { get; } - public static System.DateOnly The8th { get; } - public static System.DateOnly The9th { get; } - public static System.DateOnly The(int dayNumber) { } - } - public class August - { - public August() { } - public static System.DateOnly The10th { get; } - public static System.DateOnly The11th { get; } - public static System.DateOnly The12th { get; } - public static System.DateOnly The13th { get; } - public static System.DateOnly The14th { get; } - public static System.DateOnly The15th { get; } - public static System.DateOnly The16th { get; } - public static System.DateOnly The17th { get; } - public static System.DateOnly The18th { get; } - public static System.DateOnly The19th { get; } - public static System.DateOnly The1st { get; } - public static System.DateOnly The20th { get; } - public static System.DateOnly The21st { get; } - public static System.DateOnly The22nd { get; } - public static System.DateOnly The23rd { get; } - public static System.DateOnly The24th { get; } - public static System.DateOnly The25th { get; } - public static System.DateOnly The26th { get; } - public static System.DateOnly The27th { get; } - public static System.DateOnly The28th { get; } - public static System.DateOnly The29th { get; } - public static System.DateOnly The2nd { get; } - public static System.DateOnly The30th { get; } - public static System.DateOnly The31st { get; } - public static System.DateOnly The3rd { get; } - public static System.DateOnly The4th { get; } - public static System.DateOnly The5th { get; } - public static System.DateOnly The6th { get; } - public static System.DateOnly The7th { get; } - public static System.DateOnly The8th { get; } - public static System.DateOnly The9th { get; } - public static System.DateOnly The(int dayNumber) { } - } - public class December - { - public December() { } - public static System.DateOnly The10th { get; } - public static System.DateOnly The11th { get; } - public static System.DateOnly The12th { get; } - public static System.DateOnly The13th { get; } - public static System.DateOnly The14th { get; } - public static System.DateOnly The15th { get; } - public static System.DateOnly The16th { get; } - public static System.DateOnly The17th { get; } - public static System.DateOnly The18th { get; } - public static System.DateOnly The19th { get; } - public static System.DateOnly The1st { get; } - public static System.DateOnly The20th { get; } - public static System.DateOnly The21st { get; } - public static System.DateOnly The22nd { get; } - public static System.DateOnly The23rd { get; } - public static System.DateOnly The24th { get; } - public static System.DateOnly The25th { get; } - public static System.DateOnly The26th { get; } - public static System.DateOnly The27th { get; } - public static System.DateOnly The28th { get; } - public static System.DateOnly The29th { get; } - public static System.DateOnly The2nd { get; } - public static System.DateOnly The30th { get; } - public static System.DateOnly The31st { get; } - public static System.DateOnly The3rd { get; } - public static System.DateOnly The4th { get; } - public static System.DateOnly The5th { get; } - public static System.DateOnly The6th { get; } - public static System.DateOnly The7th { get; } - public static System.DateOnly The8th { get; } - public static System.DateOnly The9th { get; } - public static System.DateOnly The(int dayNumber) { } - } - public class February - { - public February() { } - public static System.DateOnly The10th { get; } - public static System.DateOnly The11th { get; } - public static System.DateOnly The12th { get; } - public static System.DateOnly The13th { get; } - public static System.DateOnly The14th { get; } - public static System.DateOnly The15th { get; } - public static System.DateOnly The16th { get; } - public static System.DateOnly The17th { get; } - public static System.DateOnly The18th { get; } - public static System.DateOnly The19th { get; } - public static System.DateOnly The1st { get; } - public static System.DateOnly The20th { get; } - public static System.DateOnly The21st { get; } - public static System.DateOnly The22nd { get; } - public static System.DateOnly The23rd { get; } - public static System.DateOnly The24th { get; } - public static System.DateOnly The25th { get; } - public static System.DateOnly The26th { get; } - public static System.DateOnly The27th { get; } - public static System.DateOnly The28th { get; } - public static System.DateOnly The29th { get; } - public static System.DateOnly The2nd { get; } - public static System.DateOnly The3rd { get; } - public static System.DateOnly The4th { get; } - public static System.DateOnly The5th { get; } - public static System.DateOnly The6th { get; } - public static System.DateOnly The7th { get; } - public static System.DateOnly The8th { get; } - public static System.DateOnly The9th { get; } - public static System.DateOnly The(int dayNumber) { } - } - public class January - { - public January() { } - public static System.DateOnly The10th { get; } - public static System.DateOnly The11th { get; } - public static System.DateOnly The12th { get; } - public static System.DateOnly The13th { get; } - public static System.DateOnly The14th { get; } - public static System.DateOnly The15th { get; } - public static System.DateOnly The16th { get; } - public static System.DateOnly The17th { get; } - public static System.DateOnly The18th { get; } - public static System.DateOnly The19th { get; } - public static System.DateOnly The1st { get; } - public static System.DateOnly The20th { get; } - public static System.DateOnly The21st { get; } - public static System.DateOnly The22nd { get; } - public static System.DateOnly The23rd { get; } - public static System.DateOnly The24th { get; } - public static System.DateOnly The25th { get; } - public static System.DateOnly The26th { get; } - public static System.DateOnly The27th { get; } - public static System.DateOnly The28th { get; } - public static System.DateOnly The29th { get; } - public static System.DateOnly The2nd { get; } - public static System.DateOnly The30th { get; } - public static System.DateOnly The31st { get; } - public static System.DateOnly The3rd { get; } - public static System.DateOnly The4th { get; } - public static System.DateOnly The5th { get; } - public static System.DateOnly The6th { get; } - public static System.DateOnly The7th { get; } - public static System.DateOnly The8th { get; } - public static System.DateOnly The9th { get; } - public static System.DateOnly The(int dayNumber) { } - } - public class July - { - public July() { } - public static System.DateOnly The10th { get; } - public static System.DateOnly The11th { get; } - public static System.DateOnly The12th { get; } - public static System.DateOnly The13th { get; } - public static System.DateOnly The14th { get; } - public static System.DateOnly The15th { get; } - public static System.DateOnly The16th { get; } - public static System.DateOnly The17th { get; } - public static System.DateOnly The18th { get; } - public static System.DateOnly The19th { get; } - public static System.DateOnly The1st { get; } - public static System.DateOnly The20th { get; } - public static System.DateOnly The21st { get; } - public static System.DateOnly The22nd { get; } - public static System.DateOnly The23rd { get; } - public static System.DateOnly The24th { get; } - public static System.DateOnly The25th { get; } - public static System.DateOnly The26th { get; } - public static System.DateOnly The27th { get; } - public static System.DateOnly The28th { get; } - public static System.DateOnly The29th { get; } - public static System.DateOnly The2nd { get; } - public static System.DateOnly The30th { get; } - public static System.DateOnly The31st { get; } - public static System.DateOnly The3rd { get; } - public static System.DateOnly The4th { get; } - public static System.DateOnly The5th { get; } - public static System.DateOnly The6th { get; } - public static System.DateOnly The7th { get; } - public static System.DateOnly The8th { get; } - public static System.DateOnly The9th { get; } - public static System.DateOnly The(int dayNumber) { } - } - public class June - { - public June() { } - public static System.DateOnly The10th { get; } - public static System.DateOnly The11th { get; } - public static System.DateOnly The12th { get; } - public static System.DateOnly The13th { get; } - public static System.DateOnly The14th { get; } - public static System.DateOnly The15th { get; } - public static System.DateOnly The16th { get; } - public static System.DateOnly The17th { get; } - public static System.DateOnly The18th { get; } - public static System.DateOnly The19th { get; } - public static System.DateOnly The1st { get; } - public static System.DateOnly The20th { get; } - public static System.DateOnly The21st { get; } - public static System.DateOnly The22nd { get; } - public static System.DateOnly The23rd { get; } - public static System.DateOnly The24th { get; } - public static System.DateOnly The25th { get; } - public static System.DateOnly The26th { get; } - public static System.DateOnly The27th { get; } - public static System.DateOnly The28th { get; } - public static System.DateOnly The29th { get; } - public static System.DateOnly The2nd { get; } - public static System.DateOnly The30th { get; } - public static System.DateOnly The3rd { get; } - public static System.DateOnly The4th { get; } - public static System.DateOnly The5th { get; } - public static System.DateOnly The6th { get; } - public static System.DateOnly The7th { get; } - public static System.DateOnly The8th { get; } - public static System.DateOnly The9th { get; } - public static System.DateOnly The(int dayNumber) { } - } - public class March - { - public March() { } - public static System.DateOnly The10th { get; } - public static System.DateOnly The11th { get; } - public static System.DateOnly The12th { get; } - public static System.DateOnly The13th { get; } - public static System.DateOnly The14th { get; } - public static System.DateOnly The15th { get; } - public static System.DateOnly The16th { get; } - public static System.DateOnly The17th { get; } - public static System.DateOnly The18th { get; } - public static System.DateOnly The19th { get; } - public static System.DateOnly The1st { get; } - public static System.DateOnly The20th { get; } - public static System.DateOnly The21st { get; } - public static System.DateOnly The22nd { get; } - public static System.DateOnly The23rd { get; } - public static System.DateOnly The24th { get; } - public static System.DateOnly The25th { get; } - public static System.DateOnly The26th { get; } - public static System.DateOnly The27th { get; } - public static System.DateOnly The28th { get; } - public static System.DateOnly The29th { get; } - public static System.DateOnly The2nd { get; } - public static System.DateOnly The30th { get; } - public static System.DateOnly The31st { get; } - public static System.DateOnly The3rd { get; } - public static System.DateOnly The4th { get; } - public static System.DateOnly The5th { get; } - public static System.DateOnly The6th { get; } - public static System.DateOnly The7th { get; } - public static System.DateOnly The8th { get; } - public static System.DateOnly The9th { get; } - public static System.DateOnly The(int dayNumber) { } - } - public class May - { - public May() { } - public static System.DateOnly The10th { get; } - public static System.DateOnly The11th { get; } - public static System.DateOnly The12th { get; } - public static System.DateOnly The13th { get; } - public static System.DateOnly The14th { get; } - public static System.DateOnly The15th { get; } - public static System.DateOnly The16th { get; } - public static System.DateOnly The17th { get; } - public static System.DateOnly The18th { get; } - public static System.DateOnly The19th { get; } - public static System.DateOnly The1st { get; } - public static System.DateOnly The20th { get; } - public static System.DateOnly The21st { get; } - public static System.DateOnly The22nd { get; } - public static System.DateOnly The23rd { get; } - public static System.DateOnly The24th { get; } - public static System.DateOnly The25th { get; } - public static System.DateOnly The26th { get; } - public static System.DateOnly The27th { get; } - public static System.DateOnly The28th { get; } - public static System.DateOnly The29th { get; } - public static System.DateOnly The2nd { get; } - public static System.DateOnly The30th { get; } - public static System.DateOnly The31st { get; } - public static System.DateOnly The3rd { get; } - public static System.DateOnly The4th { get; } - public static System.DateOnly The5th { get; } - public static System.DateOnly The6th { get; } - public static System.DateOnly The7th { get; } - public static System.DateOnly The8th { get; } - public static System.DateOnly The9th { get; } - public static System.DateOnly The(int dayNumber) { } - } - public class November - { - public November() { } - public static System.DateOnly The10th { get; } - public static System.DateOnly The11th { get; } - public static System.DateOnly The12th { get; } - public static System.DateOnly The13th { get; } - public static System.DateOnly The14th { get; } - public static System.DateOnly The15th { get; } - public static System.DateOnly The16th { get; } - public static System.DateOnly The17th { get; } - public static System.DateOnly The18th { get; } - public static System.DateOnly The19th { get; } - public static System.DateOnly The1st { get; } - public static System.DateOnly The20th { get; } - public static System.DateOnly The21st { get; } - public static System.DateOnly The22nd { get; } - public static System.DateOnly The23rd { get; } - public static System.DateOnly The24th { get; } - public static System.DateOnly The25th { get; } - public static System.DateOnly The26th { get; } - public static System.DateOnly The27th { get; } - public static System.DateOnly The28th { get; } - public static System.DateOnly The29th { get; } - public static System.DateOnly The2nd { get; } - public static System.DateOnly The30th { get; } - public static System.DateOnly The3rd { get; } - public static System.DateOnly The4th { get; } - public static System.DateOnly The5th { get; } - public static System.DateOnly The6th { get; } - public static System.DateOnly The7th { get; } - public static System.DateOnly The8th { get; } - public static System.DateOnly The9th { get; } - public static System.DateOnly The(int dayNumber) { } - } - public class October - { - public October() { } - public static System.DateOnly The10th { get; } - public static System.DateOnly The11th { get; } - public static System.DateOnly The12th { get; } - public static System.DateOnly The13th { get; } - public static System.DateOnly The14th { get; } - public static System.DateOnly The15th { get; } - public static System.DateOnly The16th { get; } - public static System.DateOnly The17th { get; } - public static System.DateOnly The18th { get; } - public static System.DateOnly The19th { get; } - public static System.DateOnly The1st { get; } - public static System.DateOnly The20th { get; } - public static System.DateOnly The21st { get; } - public static System.DateOnly The22nd { get; } - public static System.DateOnly The23rd { get; } - public static System.DateOnly The24th { get; } - public static System.DateOnly The25th { get; } - public static System.DateOnly The26th { get; } - public static System.DateOnly The27th { get; } - public static System.DateOnly The28th { get; } - public static System.DateOnly The29th { get; } - public static System.DateOnly The2nd { get; } - public static System.DateOnly The30th { get; } - public static System.DateOnly The31st { get; } - public static System.DateOnly The3rd { get; } - public static System.DateOnly The4th { get; } - public static System.DateOnly The5th { get; } - public static System.DateOnly The6th { get; } - public static System.DateOnly The7th { get; } - public static System.DateOnly The8th { get; } - public static System.DateOnly The9th { get; } - public static System.DateOnly The(int dayNumber) { } - } - public class September - { - public September() { } - public static System.DateOnly The10th { get; } - public static System.DateOnly The11th { get; } - public static System.DateOnly The12th { get; } - public static System.DateOnly The13th { get; } - public static System.DateOnly The14th { get; } - public static System.DateOnly The15th { get; } - public static System.DateOnly The16th { get; } - public static System.DateOnly The17th { get; } - public static System.DateOnly The18th { get; } - public static System.DateOnly The19th { get; } - public static System.DateOnly The1st { get; } - public static System.DateOnly The20th { get; } - public static System.DateOnly The21st { get; } - public static System.DateOnly The22nd { get; } - public static System.DateOnly The23rd { get; } - public static System.DateOnly The24th { get; } - public static System.DateOnly The25th { get; } - public static System.DateOnly The26th { get; } - public static System.DateOnly The27th { get; } - public static System.DateOnly The28th { get; } - public static System.DateOnly The29th { get; } - public static System.DateOnly The2nd { get; } - public static System.DateOnly The30th { get; } - public static System.DateOnly The3rd { get; } - public static System.DateOnly The4th { get; } - public static System.DateOnly The5th { get; } - public static System.DateOnly The6th { get; } - public static System.DateOnly The7th { get; } - public static System.DateOnly The8th { get; } - public static System.DateOnly The9th { get; } - public static System.DateOnly The(int dayNumber) { } - } - } - public enum OnNoMatch - { - ThrowsException = 0, - ReturnsNull = 1, - } - public class static OrdinalizeExtensions - { - public static string Ordinalize(this string numberString) { } - public static string Ordinalize(this string numberString, System.Globalization.CultureInfo culture) { } - public static string Ordinalize(this string numberString, Humanizer.GrammaticalGender gender) { } - public static string Ordinalize(this string numberString, Humanizer.GrammaticalGender gender, System.Globalization.CultureInfo culture) { } - public static string Ordinalize(this int number) { } - public static string Ordinalize(this int number, System.Globalization.CultureInfo culture) { } - public static string Ordinalize(this int number, Humanizer.GrammaticalGender gender) { } - public static string Ordinalize(this int number, Humanizer.GrammaticalGender gender, System.Globalization.CultureInfo culture) { } - } - public enum Plurality - { - Singular = 0, - Plural = 1, - CouldBeEither = 2, - } - public class static PrepositionsExtensions - { - public static System.DateTime At(this System.DateTime date, int hour, int min = 0, int second = 0, int millisecond = 0) { } - public static System.DateTime AtMidnight(this System.DateTime date) { } - public static System.DateTime AtNoon(this System.DateTime date) { } - public static System.DateTime In(this System.DateTime date, int year) { } - } - public class static RomanNumeralExtensions - { - public static int FromRoman(this string input) { } - public static string ToRoman(this int input) { } - } - public enum ShowQuantityAs - { - None = 0, - Numeric = 1, - Words = 2, - } - public class static StringDehumanizeExtensions - { - public static string Dehumanize(this string input) { } - } - public class static StringExtensions - { - public static string FormatWith(this string format, params object[] args) { } - public static string FormatWith(this string format, System.IFormatProvider provider, params object[] args) { } - } - public class static StringHumanizeExtensions - { - public static string Humanize(this string input) { } - public static string Humanize(this string input, Humanizer.LetterCasing casing) { } - } - public class static TimeOnlyToClockNotationExtensions - { - public static string ToClockNotation(this System.TimeOnly input) { } - } - public class static TimeSpanHumanizeExtensions - { - public static string Humanize(this System.TimeSpan timeSpan, int precision = 1, System.Globalization.CultureInfo culture = null, Humanizer.Localisation.TimeUnit maxUnit = 5, Humanizer.Localisation.TimeUnit minUnit = 0, string collectionSeparator = ", ", bool toWords = False) { } - public static string Humanize(this System.TimeSpan timeSpan, int precision, bool countEmptyUnits, System.Globalization.CultureInfo culture = null, Humanizer.Localisation.TimeUnit maxUnit = 5, Humanizer.Localisation.TimeUnit minUnit = 0, string collectionSeparator = ", ", bool toWords = False) { } - } - public class static To - { - public static Humanizer.ICulturedStringTransformer LowerCase { get; } - public static Humanizer.ICulturedStringTransformer SentenceCase { get; } - public static Humanizer.ICulturedStringTransformer TitleCase { get; } - public static Humanizer.ICulturedStringTransformer UpperCase { get; } - public static string Transform(this string input, params Humanizer.IStringTransformer[] transformers) { } - public static string Transform(this string input, System.Globalization.CultureInfo culture, params Humanizer.ICulturedStringTransformer[] transformers) { } - } - public class static ToQuantityExtensions - { - public static string ToQuantity(this string input, int quantity, Humanizer.ShowQuantityAs showQuantityAs = 1) { } - public static string ToQuantity(this string input, int quantity, string format, System.IFormatProvider formatProvider = null) { } - public static string ToQuantity(this string input, long quantity, Humanizer.ShowQuantityAs showQuantityAs = 1) { } - public static string ToQuantity(this string input, long quantity, string format, System.IFormatProvider formatProvider = null) { } - public static string ToQuantity(this string input, double quantity, string format = null, System.IFormatProvider formatProvider = null) { } - public static string ToQuantity(this string input, double quantity) { } - } - public class static TruncateExtensions - { - public static string Truncate(this string input, int length) { } - public static string Truncate(this string input, int length, Humanizer.ITruncator truncator, Humanizer.TruncateFrom from = 1) { } - public static string Truncate(this string input, int length, string truncationString, Humanizer.TruncateFrom from = 1) { } - public static string Truncate(this string input, int length, string truncationString, Humanizer.ITruncator truncator, Humanizer.TruncateFrom from = 1) { } - } - public enum TruncateFrom - { - Left = 0, - Right = 1, - } - public class static Truncator - { - public static Humanizer.ITruncator FixedLength { get; } - public static Humanizer.ITruncator FixedNumberOfCharacters { get; } - public static Humanizer.ITruncator FixedNumberOfWords { get; } - } - public class static TupleizeExtensions - { - public static string Tupleize(this int input) { } - } -} -namespace Humanizer.Bytes -{ - public class ByteRate - { - public ByteRate(Humanizer.Bytes.ByteSize size, System.TimeSpan interval) { } - public System.TimeSpan Interval { get; } - public Humanizer.Bytes.ByteSize Size { get; } - public string Humanize(Humanizer.Localisation.TimeUnit timeUnit = 1) { } - public string Humanize(string format, Humanizer.Localisation.TimeUnit timeUnit = 1) { } - } - public struct ByteSize : System.IComparable, System.IComparable, System.IEquatable, System.IFormattable - { - public const string Bit = "bit"; - public const string BitSymbol = "b"; - public const long BitsInByte = 8; - public const string Byte = "byte"; - public const string ByteSymbol = "B"; - public const long BytesInGigabyte = 1073741824; - public const long BytesInKilobyte = 1024; - public const long BytesInMegabyte = 1048576; - public const long BytesInTerabyte = 1099511627776; - public const string Gigabyte = "gigabyte"; - public const string GigabyteSymbol = "GB"; - public const string Kilobyte = "kilobyte"; - public const string KilobyteSymbol = "KB"; - public static readonly Humanizer.Bytes.ByteSize MaxValue; - public const string Megabyte = "megabyte"; - public const string MegabyteSymbol = "MB"; - public static readonly Humanizer.Bytes.ByteSize MinValue; - public const string Terabyte = "terabyte"; - public const string TerabyteSymbol = "TB"; - public ByteSize(double byteSize) { } - [get: System.Runtime.CompilerServices.IsReadOnlyAttribute()] - public long Bits { get; } - [get: System.Runtime.CompilerServices.IsReadOnlyAttribute()] - public double Bytes { get; } - [get: System.Runtime.CompilerServices.IsReadOnlyAttribute()] - public double Gigabytes { get; } - [get: System.Runtime.CompilerServices.IsReadOnlyAttribute()] - public double Kilobytes { get; } - public string LargestWholeNumberFullWord { get; } - public string LargestWholeNumberSymbol { get; } - public double LargestWholeNumberValue { get; } - [get: System.Runtime.CompilerServices.IsReadOnlyAttribute()] - public double Megabytes { get; } - [get: System.Runtime.CompilerServices.IsReadOnlyAttribute()] - public double Terabytes { get; } - public Humanizer.Bytes.ByteSize Add(Humanizer.Bytes.ByteSize bs) { } - public Humanizer.Bytes.ByteSize AddBits(long value) { } - public Humanizer.Bytes.ByteSize AddBytes(double value) { } - public Humanizer.Bytes.ByteSize AddGigabytes(double value) { } - public Humanizer.Bytes.ByteSize AddKilobytes(double value) { } - public Humanizer.Bytes.ByteSize AddMegabytes(double value) { } - public Humanizer.Bytes.ByteSize AddTerabytes(double value) { } - public int CompareTo(object obj) { } - public int CompareTo(Humanizer.Bytes.ByteSize other) { } - public override bool Equals(object value) { } - public bool Equals(Humanizer.Bytes.ByteSize value) { } - public static Humanizer.Bytes.ByteSize FromBits(long value) { } - public static Humanizer.Bytes.ByteSize FromBytes(double value) { } - public static Humanizer.Bytes.ByteSize FromGigabytes(double value) { } - public static Humanizer.Bytes.ByteSize FromKilobytes(double value) { } - public static Humanizer.Bytes.ByteSize FromMegabytes(double value) { } - public static Humanizer.Bytes.ByteSize FromTerabytes(double value) { } - public override int GetHashCode() { } - public string GetLargestWholeNumberFullWord(System.IFormatProvider provider = null) { } - public string GetLargestWholeNumberSymbol(System.IFormatProvider provider = null) { } - public static Humanizer.Bytes.ByteSize Parse(string s) { } - public static Humanizer.Bytes.ByteSize Parse(string s, System.IFormatProvider formatProvider) { } - public Humanizer.Bytes.ByteSize Subtract(Humanizer.Bytes.ByteSize bs) { } - public string ToFullWords(string format = null, System.IFormatProvider provider = null) { } - public override string ToString() { } - public string ToString(System.IFormatProvider provider) { } - public string ToString(string format) { } - public string ToString(string format, System.IFormatProvider provider) { } - public static bool TryParse(string s, out Humanizer.Bytes.ByteSize result) { } - public static bool TryParse(string s, System.IFormatProvider formatProvider, out Humanizer.Bytes.ByteSize result) { } - public static Humanizer.Bytes.ByteSize +(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } - public static Humanizer.Bytes.ByteSize --(Humanizer.Bytes.ByteSize b) { } - public static bool ==(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } - public static bool >(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } - public static bool >=(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } - public static Humanizer.Bytes.ByteSize ++(Humanizer.Bytes.ByteSize b) { } - public static bool !=(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } - public static bool <(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } - public static bool <=(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } - public static Humanizer.Bytes.ByteSize -(Humanizer.Bytes.ByteSize b1, Humanizer.Bytes.ByteSize b2) { } - public static Humanizer.Bytes.ByteSize -(Humanizer.Bytes.ByteSize b) { } - } -} -namespace Humanizer.Configuration -{ - public class static Configurator - { - public static Humanizer.Configuration.LocaliserRegistry CollectionFormatters { get; } - public static Humanizer.DateTimeHumanizeStrategy.IDateOnlyHumanizeStrategy DateOnlyHumanizeStrategy { get; set; } - public static Humanizer.Configuration.LocaliserRegistry DateOnlyToOrdinalWordsConverters { get; } - public static Humanizer.DateTimeHumanizeStrategy.IDateTimeHumanizeStrategy DateTimeHumanizeStrategy { get; set; } - public static Humanizer.DateTimeHumanizeStrategy.IDateTimeOffsetHumanizeStrategy DateTimeOffsetHumanizeStrategy { get; set; } - public static Humanizer.Configuration.LocaliserRegistry DateToOrdinalWordsConverters { get; } - public static System.Func EnumDescriptionPropertyLocator { get; set; } - public static Humanizer.Configuration.LocaliserRegistry Formatters { get; } - public static Humanizer.Configuration.LocaliserRegistry NumberToWordsConverters { get; } - public static Humanizer.Configuration.LocaliserRegistry Ordinalizers { get; } - public static Humanizer.DateTimeHumanizeStrategy.ITimeOnlyHumanizeStrategy TimeOnlyHumanizeStrategy { get; set; } - public static Humanizer.Configuration.LocaliserRegistry TimeOnlyToClockNotationConverters { get; } - } - public class LocaliserRegistry - where TLocaliser : class - { - public LocaliserRegistry(TLocaliser defaultLocaliser) { } - public LocaliserRegistry(System.Func defaultLocaliser) { } - public void Register(string localeCode, TLocaliser localiser) { } - public void Register(string localeCode, System.Func localiser) { } - public TLocaliser ResolveForCulture(System.Globalization.CultureInfo culture) { } - public TLocaliser ResolveForUiCulture() { } - } -} -namespace Humanizer.DateTimeHumanizeStrategy -{ - public class DefaultDateOnlyHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateOnlyHumanizeStrategy - { - public DefaultDateOnlyHumanizeStrategy() { } - public string Humanize(System.DateOnly input, System.DateOnly comparisonBase, System.Globalization.CultureInfo culture) { } - } - public class DefaultDateTimeHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateTimeHumanizeStrategy - { - public DefaultDateTimeHumanizeStrategy() { } - public string Humanize(System.DateTime input, System.DateTime comparisonBase, System.Globalization.CultureInfo culture) { } - } - public class DefaultDateTimeOffsetHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateTimeOffsetHumanizeStrategy - { - public DefaultDateTimeOffsetHumanizeStrategy() { } - public string Humanize(System.DateTimeOffset input, System.DateTimeOffset comparisonBase, System.Globalization.CultureInfo culture) { } - } - public class DefaultTimeOnlyHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.ITimeOnlyHumanizeStrategy - { - public DefaultTimeOnlyHumanizeStrategy() { } - public string Humanize(System.TimeOnly input, System.TimeOnly comparisonBase, System.Globalization.CultureInfo culture) { } - } - public interface IDateOnlyHumanizeStrategy - { - string Humanize(System.DateOnly input, System.DateOnly comparisonBase, System.Globalization.CultureInfo culture); - } - public interface IDateTimeHumanizeStrategy - { - string Humanize(System.DateTime input, System.DateTime comparisonBase, System.Globalization.CultureInfo culture); - } - public interface IDateTimeOffsetHumanizeStrategy - { - string Humanize(System.DateTimeOffset input, System.DateTimeOffset comparisonBase, System.Globalization.CultureInfo culture); - } - public interface ITimeOnlyHumanizeStrategy - { - string Humanize(System.TimeOnly input, System.TimeOnly comparisonBase, System.Globalization.CultureInfo culture); - } - public class PrecisionDateOnlyHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateOnlyHumanizeStrategy - { - public PrecisionDateOnlyHumanizeStrategy(double precision = 0.75) { } - public string Humanize(System.DateOnly input, System.DateOnly comparisonBase, System.Globalization.CultureInfo culture) { } - } - public class PrecisionDateTimeHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateTimeHumanizeStrategy - { - public PrecisionDateTimeHumanizeStrategy(double precision = 0.75) { } - public string Humanize(System.DateTime input, System.DateTime comparisonBase, System.Globalization.CultureInfo culture) { } - } - public class PrecisionDateTimeOffsetHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.IDateTimeOffsetHumanizeStrategy - { - public PrecisionDateTimeOffsetHumanizeStrategy(double precision = 0.75) { } - public string Humanize(System.DateTimeOffset input, System.DateTimeOffset comparisonBase, System.Globalization.CultureInfo culture) { } - } - public class PrecisionTimeOnlyHumanizeStrategy : Humanizer.DateTimeHumanizeStrategy.ITimeOnlyHumanizeStrategy - { - public PrecisionTimeOnlyHumanizeStrategy(double precision = 0.75) { } - public string Humanize(System.TimeOnly input, System.TimeOnly comparisonBase, System.Globalization.CultureInfo culture) { } - } -} -namespace Humanizer.Inflections -{ - public class static Vocabularies - { - public static Humanizer.Inflections.Vocabulary Default { get; } - } - public class Vocabulary - { - public void AddIrregular(string singular, string plural, bool matchEnding = True) { } - public void AddPlural(string rule, string replacement) { } - public void AddSingular(string rule, string replacement) { } - public void AddUncountable(string word) { } - public string Pluralize(string word, bool inputIsKnownToBeSingular = True) { } - public string Singularize(string word, bool inputIsKnownToBePlural = True, bool skipSimpleWords = False) { } - } -} -namespace Humanizer.Localisation.CollectionFormatters -{ - public interface ICollectionFormatter - { - string Humanize(System.Collections.Generic.IEnumerable collection); - string Humanize(System.Collections.Generic.IEnumerable collection, System.Func objectFormatter); - string Humanize(System.Collections.Generic.IEnumerable collection, System.Func objectFormatter); - string Humanize(System.Collections.Generic.IEnumerable collection, string separator); - string Humanize(System.Collections.Generic.IEnumerable collection, System.Func objectFormatter, string separator); - string Humanize(System.Collections.Generic.IEnumerable collection, System.Func objectFormatter, string separator); - } -} -namespace Humanizer.Localisation -{ - public enum DataUnit - { - Bit = 0, - Byte = 1, - Kilobyte = 2, - Megabyte = 3, - Gigabyte = 4, - Terabyte = 5, - } - public class ResourceKeys - { - public ResourceKeys() { } - public class static DateHumanize - { - public const string Never = "DateHumanize_Never"; - public const string Now = "DateHumanize_Now"; - public static string GetResourceKey(Humanizer.Localisation.TimeUnit timeUnit, Humanizer.Localisation.Tense timeUnitTense, int count = 1) { } - } - public class static TimeSpanHumanize - { - public static string GetResourceKey(Humanizer.Localisation.TimeUnit unit, int count = 1, bool toWords = False) { } - } - } - public class static Resources - { - public static string GetResource(string resourceKey, System.Globalization.CultureInfo culture = null) { } - } - public enum Tense - { - Future = 0, - Past = 1, - } - public enum TimeUnit - { - Millisecond = 0, - Second = 1, - Minute = 2, - Hour = 3, - Day = 4, - Week = 5, - Month = 6, - Year = 7, - } -} -namespace Humanizer.Localisation.DateToOrdinalWords -{ - public interface IDateOnlyToOrdinalWordConverter - { - string Convert(System.DateOnly date); - string Convert(System.DateOnly date, Humanizer.GrammaticalCase grammaticalCase); - } - public interface IDateToOrdinalWordConverter - { - string Convert(System.DateTime date); - string Convert(System.DateTime date, Humanizer.GrammaticalCase grammaticalCase); - } -} -namespace Humanizer.Localisation.Formatters -{ - public class DefaultFormatter : Humanizer.Localisation.Formatters.IFormatter - { - public DefaultFormatter(string localeCode) { } - public virtual string DataUnitHumanize(Humanizer.Localisation.DataUnit dataUnit, double count, bool toSymbol = True) { } - public virtual string DateHumanize(Humanizer.Localisation.TimeUnit timeUnit, Humanizer.Localisation.Tense timeUnitTense, int unit) { } - public virtual string DateHumanize_Never() { } - public virtual string DateHumanize_Now() { } - protected virtual string Format(string resourceKey) { } - protected virtual string Format(string resourceKey, int number, bool toWords = False) { } - protected virtual string GetResourceKey(string resourceKey, int number) { } - protected virtual string GetResourceKey(string resourceKey) { } - public virtual string TimeSpanHumanize(Humanizer.Localisation.TimeUnit timeUnit, int unit, bool toWords = False) { } - public virtual string TimeSpanHumanize_Zero() { } - } - public interface IFormatter - { - string DataUnitHumanize(Humanizer.Localisation.DataUnit dataUnit, double count, bool toSymbol = True); - string DateHumanize(Humanizer.Localisation.TimeUnit timeUnit, Humanizer.Localisation.Tense timeUnitTense, int unit); - string DateHumanize_Never(); - string DateHumanize_Now(); - string TimeSpanHumanize(Humanizer.Localisation.TimeUnit timeUnit, int unit, bool toWords = False); - string TimeSpanHumanize_Zero(); - } -} -namespace Humanizer.Localisation.NumberToWords -{ - public interface INumberToWordsConverter - { - string Convert(long number); - string Convert(long number, bool addAnd); - string Convert(long number, Humanizer.GrammaticalGender gender, bool addAnd = True); - string ConvertToOrdinal(int number); - string ConvertToOrdinal(int number, Humanizer.GrammaticalGender gender); - string ConvertToTuple(int number); - } -} -namespace Humanizer.Localisation.Ordinalizers -{ - public interface IOrdinalizer - { - string Convert(int number, string numberString); - string Convert(int number, string numberString, Humanizer.GrammaticalGender gender); - } -} -namespace Humanizer.Localisation.TimeToClockNotation -{ - public interface ITimeOnlyToClockNotationConverter - { - string Convert(System.TimeOnly time); - } - public class TimeOnlyToClockNotationConverter : Humanizer.Localisation.TimeToClockNotation.ITimeOnlyToClockNotationConverter - { - public TimeOnlyToClockNotationConverter() { } - public virtual string Convert(System.TimeOnly time) { } - } -} \ No newline at end of file diff --git a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt index d7201d209..c9d8f7bd5 100644 --- a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt +++ b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt @@ -1953,6 +1953,11 @@ namespace Humanizer.Localisation.Ordinalizers } namespace Humanizer.Localisation.TimeToClockNotation { + public class BrazilianPortugueseTimeOnlyToClockNotationConverter : Humanizer.Localisation.TimeToClockNotation.ITimeOnlyToClockNotationConverter + { + public BrazilianPortugueseTimeOnlyToClockNotationConverter() { } + public virtual string Convert(System.TimeOnly time) { } + } public class DefaultTimeOnlyToClockNotationConverter : Humanizer.Localisation.TimeToClockNotation.ITimeOnlyToClockNotationConverter { public DefaultTimeOnlyToClockNotationConverter() { } @@ -1962,9 +1967,4 @@ namespace Humanizer.Localisation.TimeToClockNotation { string Convert(System.TimeOnly time); } - public class PtBrTimeOnlyToClockNotationConverter : Humanizer.Localisation.TimeToClockNotation.ITimeOnlyToClockNotationConverter - { - public PtBrTimeOnlyToClockNotationConverter() { } - public virtual string Convert(System.TimeOnly time) { } - } } \ No newline at end of file diff --git a/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs b/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs index 37aceea14..9e965d5f1 100644 --- a/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs +++ b/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs @@ -11,7 +11,7 @@ public TimeOnlyToClockNotationConvertersRegistry() : base(new DefaultTimeOnlyToC Register("en-US", new DefaultTimeOnlyToClockNotationConverter()); Register("en-UK", new DefaultTimeOnlyToClockNotationConverter()); Register("de", new DefaultTimeOnlyToClockNotationConverter()); - Register("pt-BR", new PtBrTimeOnlyToClockNotationConverter()); + Register("pt-BR", new BrazilianPortugueseTimeOnlyToClockNotationConverter()); } } } diff --git a/src/Humanizer/Localisation/TimeToClockNotation/PtBrTimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs similarity index 91% rename from src/Humanizer/Localisation/TimeToClockNotation/PtBrTimeOnlyToClockNotationConverter.cs rename to src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs index 6d372e9a7..9d5e7cc49 100644 --- a/src/Humanizer/Localisation/TimeToClockNotation/PtBrTimeOnlyToClockNotationConverter.cs +++ b/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs @@ -4,7 +4,7 @@ namespace Humanizer.Localisation.TimeToClockNotation { - public class PtBrTimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter + public class BrazilianPortugueseTimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter { public virtual string Convert(TimeOnly time) { From 0742bab22a72bb5ca4ba753b13412f1fc51cb991 Mon Sep 17 00:00:00 2001 From: Luiz Strobelt Date: Wed, 27 Oct 2021 23:16:00 -0300 Subject: [PATCH 08/12] Remove de locale from registry --- .../Configuration/TimeOnlyToClockNotationConvertersRegistry.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs b/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs index 9e965d5f1..aff3004b2 100644 --- a/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs +++ b/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs @@ -10,7 +10,6 @@ public TimeOnlyToClockNotationConvertersRegistry() : base(new DefaultTimeOnlyToC { Register("en-US", new DefaultTimeOnlyToClockNotationConverter()); Register("en-UK", new DefaultTimeOnlyToClockNotationConverter()); - Register("de", new DefaultTimeOnlyToClockNotationConverter()); Register("pt-BR", new BrazilianPortugueseTimeOnlyToClockNotationConverter()); } } From e871d399785e86475b19618a148f6583eb37259b Mon Sep 17 00:00:00 2001 From: Luiz Strobelt Date: Wed, 27 Oct 2021 23:22:40 -0300 Subject: [PATCH 09/12] Make Converters internal --- ...blicApiApprovalTest.approve_public_api.approved.txt | 10 ---------- ...zilianPortugueseTimeOnlyToClockNotationConverter.cs | 2 +- .../DefaultTimeOnlyToClockNotationConverter.cs | 2 +- .../ITimeOnlyToClockNotationConverter.cs | 2 -- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt index c9d8f7bd5..ec1cf2809 100644 --- a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt +++ b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt @@ -1953,16 +1953,6 @@ namespace Humanizer.Localisation.Ordinalizers } namespace Humanizer.Localisation.TimeToClockNotation { - public class BrazilianPortugueseTimeOnlyToClockNotationConverter : Humanizer.Localisation.TimeToClockNotation.ITimeOnlyToClockNotationConverter - { - public BrazilianPortugueseTimeOnlyToClockNotationConverter() { } - public virtual string Convert(System.TimeOnly time) { } - } - public class DefaultTimeOnlyToClockNotationConverter : Humanizer.Localisation.TimeToClockNotation.ITimeOnlyToClockNotationConverter - { - public DefaultTimeOnlyToClockNotationConverter() { } - public virtual string Convert(System.TimeOnly time) { } - } public interface ITimeOnlyToClockNotationConverter { string Convert(System.TimeOnly time); diff --git a/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs index 9d5e7cc49..80ed77245 100644 --- a/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs +++ b/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs @@ -4,7 +4,7 @@ namespace Humanizer.Localisation.TimeToClockNotation { - public class BrazilianPortugueseTimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter + internal class BrazilianPortugueseTimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter { public virtual string Convert(TimeOnly time) { diff --git a/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs index f9f6124be..3043d148b 100644 --- a/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs +++ b/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs @@ -4,7 +4,7 @@ namespace Humanizer.Localisation.TimeToClockNotation { - public class DefaultTimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter + internal class DefaultTimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter { public virtual string Convert(TimeOnly time) { diff --git a/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs index 39172b524..f03bd178f 100644 --- a/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs +++ b/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs @@ -1,8 +1,6 @@ #if NET6_0_OR_GREATER using System; -using System.Collections.Generic; -using System.Text; namespace Humanizer.Localisation.TimeToClockNotation { From 801975d45622cdc6d9e32e69fdfe0235d7a36bc3 Mon Sep 17 00:00:00 2001 From: Luiz Strobelt Date: Thu, 28 Oct 2021 17:50:12 -0300 Subject: [PATCH 10/12] Simplify tests and registry for english languages --- .../Localisation/en/TimeToClockNotationTests.cs | 2 +- .../Configuration/TimeOnlyToClockNotationConvertersRegistry.cs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs b/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs index 3b424939f..da99f6288 100644 --- a/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs +++ b/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs @@ -7,7 +7,7 @@ namespace Humanizer.Tests.Localisation.en { public class TimeToClockNotationTests { - [UseCulture("en-US")] + [UseCulture("en")] [Theory] [InlineData(00, 00, "midnight")] [InlineData(04, 00, "four o'clock")] diff --git a/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs b/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs index aff3004b2..07d435e29 100644 --- a/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs +++ b/src/Humanizer/Configuration/TimeOnlyToClockNotationConvertersRegistry.cs @@ -8,8 +8,6 @@ internal class TimeOnlyToClockNotationConvertersRegistry : LocaliserRegistry Date: Sat, 30 Oct 2021 18:38:38 -0300 Subject: [PATCH 11/12] Add rounding to nearest five minutes --- .../en/TimeToClockNotationTests.cs | 28 +++++++++++++++- .../pt-BR/TimeToClockNotationTests.cs | 26 +++++++++++++++ ...provalTest.approve_public_api.approved.txt | 9 ++++-- ...tugueseTimeOnlyToClockNotationConverter.cs | 22 +++++++------ .../ClockNotationRounding.cs | 8 +++++ ...DefaultTimeOnlyToClockNotationConverter.cs | 32 +++++++++++-------- .../ITimeOnlyToClockNotationConverter.cs | 3 +- .../TimeOnlyToClockNotationExtensions.cs | 6 ++-- 8 files changed, 105 insertions(+), 29 deletions(-) create mode 100644 src/Humanizer/Localisation/TimeToClockNotation/ClockNotationRounding.cs diff --git a/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs b/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs index da99f6288..61789953e 100644 --- a/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs +++ b/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs @@ -2,12 +2,13 @@ using System; using Xunit; +using Humanizer.Localisation.TimeToClockNotation; namespace Humanizer.Tests.Localisation.en { + [UseCulture("en")] public class TimeToClockNotationTests { - [UseCulture("en")] [Theory] [InlineData(00, 00, "midnight")] [InlineData(04, 00, "four o'clock")] @@ -30,6 +31,31 @@ public void ConvertToClockNotationTimeOnlyStringEnUs(int hours, int minutes, str var actualResult = new TimeOnly(hours, minutes).ToClockNotation(); Assert.Equal(expectedResult, actualResult); } + + [Theory] + [InlineData(00, 00, "midnight")] + [InlineData(04, 00, "four o'clock")] + [InlineData(05, 01, "five o'clock")] + [InlineData(06, 05, "five past six")] + [InlineData(07, 10, "ten past seven")] + [InlineData(08, 15, "a quarter past eight")] + [InlineData(09, 20, "twenty past nine")] + [InlineData(10, 25, "twenty-five past ten")] + [InlineData(11, 30, "half past eleven")] + [InlineData(12, 00, "noon")] + [InlineData(13, 23, "twenty-five past one")] + [InlineData(14, 32, "half past two")] + [InlineData(15, 35, "three thirty-five")] + [InlineData(16, 40, "twenty to five")] + [InlineData(17, 45, "a quarter to six")] + [InlineData(18, 50, "ten to seven")] + [InlineData(19, 55, "five to eight")] + [InlineData(20, 59, "nine o'clock")] + public void ConvertToRoundedClockNotationTimeOnlyStringEnUs(int hours, int minutes, string expectedResult) + { + var actualResult = new TimeOnly(hours, minutes).ToClockNotation(ClockNotationRounding.NearestFiveMinutes); + Assert.Equal(expectedResult, actualResult); + } } } diff --git a/src/Humanizer.Tests.Shared/Localisation/pt-BR/TimeToClockNotationTests.cs b/src/Humanizer.Tests.Shared/Localisation/pt-BR/TimeToClockNotationTests.cs index c81c6237e..e02d5abaf 100644 --- a/src/Humanizer.Tests.Shared/Localisation/pt-BR/TimeToClockNotationTests.cs +++ b/src/Humanizer.Tests.Shared/Localisation/pt-BR/TimeToClockNotationTests.cs @@ -2,6 +2,7 @@ using System; using Xunit; +using Humanizer.Localisation.TimeToClockNotation; namespace Humanizer.Tests.Localisation.ptBR { @@ -30,6 +31,31 @@ public void ConvertToClockNotationTimeOnlyStringPtBr(int hours, int minutes, str var actualResult = new TimeOnly(hours, minutes).ToClockNotation(); Assert.Equal(expectedResult, actualResult); } + + [Theory] + [InlineData(00, 00, "meia-noite")] + [InlineData(04, 00, "quatro em ponto")] + [InlineData(05, 01, "cinco em ponto")] + [InlineData(06, 05, "seis e cinco")] + [InlineData(07, 10, "sete e dez")] + [InlineData(08, 15, "oito e quinze")] + [InlineData(09, 20, "nove e vinte")] + [InlineData(10, 25, "dez e vinte e cinco")] + [InlineData(11, 30, "onze e meia")] + [InlineData(12, 00, "meio-dia")] + [InlineData(13, 23, "uma e vinte e cinco")] + [InlineData(14, 32, "duas e meia")] + [InlineData(15, 35, "três e trinta e cinco")] + [InlineData(16, 40, "vinte para as cinco")] + [InlineData(17, 45, "quinze para as seis")] + [InlineData(18, 50, "dez para as sete")] + [InlineData(19, 55, "cinco para as oito")] + [InlineData(20, 59, "nove em ponto")] + public void ConvertToRoundedClockNotationTimeOnlyStringPtBr(int hours, int minutes, string expectedResult) + { + var actualResult = new TimeOnly(hours, minutes).ToClockNotation(ClockNotationRounding.NearestFiveMinutes); + Assert.Equal(expectedResult, actualResult); + } } } diff --git a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt index ec1cf2809..985e99dd9 100644 --- a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt +++ b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt @@ -1583,7 +1583,7 @@ namespace Humanizer } public class static TimeOnlyToClockNotationExtensions { - public static string ToClockNotation(this System.TimeOnly input) { } + public static string ToClockNotation(this System.TimeOnly input, Humanizer.Localisation.TimeToClockNotation.ClockNotationRounding roundToNearestFive = 0) { } } public class static TimeSpanHumanizeExtensions { @@ -1953,8 +1953,13 @@ namespace Humanizer.Localisation.Ordinalizers } namespace Humanizer.Localisation.TimeToClockNotation { + public enum ClockNotationRounding + { + None = 0, + NearestFiveMinutes = 1, + } public interface ITimeOnlyToClockNotationConverter { - string Convert(System.TimeOnly time); + string Convert(System.TimeOnly time, Humanizer.Localisation.TimeToClockNotation.ClockNotationRounding roundToNearestFive); } } \ No newline at end of file diff --git a/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs index 80ed77245..5167ed8c2 100644 --- a/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs +++ b/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs @@ -6,7 +6,7 @@ namespace Humanizer.Localisation.TimeToClockNotation { internal class BrazilianPortugueseTimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter { - public virtual string Convert(TimeOnly time) + public virtual string Convert(TimeOnly time, ClockNotationRounding roundToNearestFive) { switch (time) { @@ -17,16 +17,20 @@ public virtual string Convert(TimeOnly time) } var normalizedHour = time.Hour % 12; + var normalizedMinutes = (int)(roundToNearestFive == ClockNotationRounding.NearestFiveMinutes + ? 5 * Math.Round(time.Minute / 5.0) + : time.Minute); - return time switch + return normalizedMinutes switch { - { Minute: 00 } => $"{normalizedHour.ToWords()} em ponto", - { Minute: 30 } => $"{normalizedHour.ToWords()} e meia", - { Minute: 40 } => $"vinte para as {(normalizedHour + 1).ToWords()}", - { Minute: 45 } => $"quinze para as {(normalizedHour + 1).ToWords()}", - { Minute: 50 } => $"dez para as {(normalizedHour + 1).ToWords()}", - { Minute: 55 } => $"cinco para as {(normalizedHour + 1).ToWords()}", - _ => $"{normalizedHour.ToWords()} e {time.Minute.ToWords()}" + 00 => $"{normalizedHour.ToWords(GrammaticalGender.Feminine)} em ponto", + 30 => $"{normalizedHour.ToWords(GrammaticalGender.Feminine)} e meia", + 40 => $"vinte para as {(normalizedHour + 1).ToWords(GrammaticalGender.Feminine)}", + 45 => $"quinze para as {(normalizedHour + 1).ToWords(GrammaticalGender.Feminine)}", + 50 => $"dez para as {(normalizedHour + 1).ToWords(GrammaticalGender.Feminine)}", + 55 => $"cinco para as {(normalizedHour + 1).ToWords(GrammaticalGender.Feminine)}", + 60 => $"{(normalizedHour + 1).ToWords(GrammaticalGender.Feminine)} em ponto", + _ => $"{normalizedHour.ToWords(GrammaticalGender.Feminine)} e {normalizedMinutes.ToWords()}" }; } } diff --git a/src/Humanizer/Localisation/TimeToClockNotation/ClockNotationRounding.cs b/src/Humanizer/Localisation/TimeToClockNotation/ClockNotationRounding.cs new file mode 100644 index 000000000..50bc6a05f --- /dev/null +++ b/src/Humanizer/Localisation/TimeToClockNotation/ClockNotationRounding.cs @@ -0,0 +1,8 @@ +namespace Humanizer.Localisation.TimeToClockNotation +{ + public enum ClockNotationRounding + { + None, + NearestFiveMinutes + } +} diff --git a/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs index 3043d148b..b06d37d18 100644 --- a/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs +++ b/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs @@ -6,7 +6,7 @@ namespace Humanizer.Localisation.TimeToClockNotation { internal class DefaultTimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter { - public virtual string Convert(TimeOnly time) + public virtual string Convert(TimeOnly time, ClockNotationRounding roundToNearestFive) { switch (time) { @@ -17,21 +17,25 @@ public virtual string Convert(TimeOnly time) } var normalizedHour = time.Hour % 12; + var normalizedMinutes = (int)(roundToNearestFive == ClockNotationRounding.NearestFiveMinutes + ? 5 * Math.Round(time.Minute / 5.0) + : time.Minute); - return time switch + return normalizedMinutes switch { - { Minute: 00 } => $"{normalizedHour.ToWords()} o'clock", - { Minute: 05 } => $"five past {normalizedHour.ToWords()}", - { Minute: 10 } => $"ten past {normalizedHour.ToWords()}", - { Minute: 15 } => $"a quarter past {normalizedHour.ToWords()}", - { Minute: 20 } => $"twenty past {normalizedHour.ToWords()}", - { Minute: 25 } => $"twenty-five past {normalizedHour.ToWords()}", - { Minute: 30 } => $"half past {normalizedHour.ToWords()}", - { Minute: 40 } => $"twenty to {(normalizedHour + 1).ToWords()}", - { Minute: 45 } => $"a quarter to {(normalizedHour + 1).ToWords()}", - { Minute: 50 } => $"ten to {(normalizedHour + 1).ToWords()}", - { Minute: 55 } => $"five to {(normalizedHour + 1).ToWords()}", - _ => $"{normalizedHour.ToWords()} {time.Minute.ToWords()}" + 00 => $"{normalizedHour.ToWords()} o'clock", + 05 => $"five past {normalizedHour.ToWords()}", + 10 => $"ten past {normalizedHour.ToWords()}", + 15 => $"a quarter past {normalizedHour.ToWords()}", + 20 => $"twenty past {normalizedHour.ToWords()}", + 25 => $"twenty-five past {normalizedHour.ToWords()}", + 30 => $"half past {normalizedHour.ToWords()}", + 40 => $"twenty to {(normalizedHour + 1).ToWords()}", + 45 => $"a quarter to {(normalizedHour + 1).ToWords()}", + 50 => $"ten to {(normalizedHour + 1).ToWords()}", + 55 => $"five to {(normalizedHour + 1).ToWords()}", + 60 => $"{(normalizedHour + 1).ToWords()} o'clock", + _ => $"{normalizedHour.ToWords()} {normalizedMinutes.ToWords()}" }; } } diff --git a/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs index f03bd178f..b3d80fdcc 100644 --- a/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs +++ b/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs @@ -13,8 +13,9 @@ public interface ITimeOnlyToClockNotationConverter /// Converts the time to Clock Notation /// /// + /// /// - string Convert(TimeOnly time); + string Convert(TimeOnly time, ClockNotationRounding roundToNearestFive); } } diff --git a/src/Humanizer/TimeOnlyToClockNotationExtensions.cs b/src/Humanizer/TimeOnlyToClockNotationExtensions.cs index fba6c6da9..824d91637 100644 --- a/src/Humanizer/TimeOnlyToClockNotationExtensions.cs +++ b/src/Humanizer/TimeOnlyToClockNotationExtensions.cs @@ -2,6 +2,7 @@ using System; using Humanizer.Configuration; +using Humanizer.Localisation.TimeToClockNotation; namespace Humanizer { @@ -14,10 +15,11 @@ public static class TimeOnlyToClockNotationExtensions /// Turns the provided time into clock notation /// /// The time to be made into clock notation + /// Whether to round the minutes to the nearest five or not /// The time in clock notation - public static string ToClockNotation(this TimeOnly input) + public static string ToClockNotation(this TimeOnly input, ClockNotationRounding roundToNearestFive = ClockNotationRounding.None) { - return Configurator.TimeOnlyToClockNotationConverter.Convert(input); + return Configurator.TimeOnlyToClockNotationConverter.Convert(input, roundToNearestFive); } } } From fceb9397af235fd5875a985998e4e0926c439d54 Mon Sep 17 00:00:00 2001 From: Luiz Strobelt Date: Thu, 11 Nov 2021 12:10:47 -0300 Subject: [PATCH 12/12] Move ClockNotationRounding enum to root Humanizer namespace --- .../Localisation/en/TimeToClockNotationTests.cs | 1 + .../Localisation/pt-BR/TimeToClockNotationTests.cs | 1 + ...ApiApprovalTest.approve_public_api.approved.txt | 14 +++++++------- .../ClockNotationRounding.cs | 2 +- ...anPortugueseTimeOnlyToClockNotationConverter.cs | 2 ++ .../DefaultTimeOnlyToClockNotationConverter.cs | 2 ++ .../ITimeOnlyToClockNotationConverter.cs | 2 ++ src/Humanizer/TimeOnlyToClockNotationExtensions.cs | 2 ++ 8 files changed, 18 insertions(+), 8 deletions(-) rename src/Humanizer/{Localisation/TimeToClockNotation => }/ClockNotationRounding.cs (62%) diff --git a/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs b/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs index 61789953e..9b19d0669 100644 --- a/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs +++ b/src/Humanizer.Tests.Shared/Localisation/en/TimeToClockNotationTests.cs @@ -3,6 +3,7 @@ using System; using Xunit; using Humanizer.Localisation.TimeToClockNotation; +using Humanizer; namespace Humanizer.Tests.Localisation.en { diff --git a/src/Humanizer.Tests.Shared/Localisation/pt-BR/TimeToClockNotationTests.cs b/src/Humanizer.Tests.Shared/Localisation/pt-BR/TimeToClockNotationTests.cs index e02d5abaf..d232338bc 100644 --- a/src/Humanizer.Tests.Shared/Localisation/pt-BR/TimeToClockNotationTests.cs +++ b/src/Humanizer.Tests.Shared/Localisation/pt-BR/TimeToClockNotationTests.cs @@ -3,6 +3,7 @@ using System; using Xunit; using Humanizer.Localisation.TimeToClockNotation; +using Humanizer; namespace Humanizer.Tests.Localisation.ptBR { diff --git a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt index 985e99dd9..5d2374c2a 100644 --- a/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt +++ b/src/Humanizer.Tests/ApiApprover/PublicApiApprovalTest.approve_public_api.approved.txt @@ -60,6 +60,11 @@ namespace Humanizer { public static string ApplyCase(this string input, Humanizer.LetterCasing casing) { } } + public enum ClockNotationRounding + { + None = 0, + NearestFiveMinutes = 1, + } public class static CollectionHumanizeExtensions { public static string Humanize(this System.Collections.Generic.IEnumerable collection) { } @@ -1583,7 +1588,7 @@ namespace Humanizer } public class static TimeOnlyToClockNotationExtensions { - public static string ToClockNotation(this System.TimeOnly input, Humanizer.Localisation.TimeToClockNotation.ClockNotationRounding roundToNearestFive = 0) { } + public static string ToClockNotation(this System.TimeOnly input, Humanizer.ClockNotationRounding roundToNearestFive = 0) { } } public class static TimeSpanHumanizeExtensions { @@ -1953,13 +1958,8 @@ namespace Humanizer.Localisation.Ordinalizers } namespace Humanizer.Localisation.TimeToClockNotation { - public enum ClockNotationRounding - { - None = 0, - NearestFiveMinutes = 1, - } public interface ITimeOnlyToClockNotationConverter { - string Convert(System.TimeOnly time, Humanizer.Localisation.TimeToClockNotation.ClockNotationRounding roundToNearestFive); + string Convert(System.TimeOnly time, Humanizer.ClockNotationRounding roundToNearestFive); } } \ No newline at end of file diff --git a/src/Humanizer/Localisation/TimeToClockNotation/ClockNotationRounding.cs b/src/Humanizer/ClockNotationRounding.cs similarity index 62% rename from src/Humanizer/Localisation/TimeToClockNotation/ClockNotationRounding.cs rename to src/Humanizer/ClockNotationRounding.cs index 50bc6a05f..7d9fa8f71 100644 --- a/src/Humanizer/Localisation/TimeToClockNotation/ClockNotationRounding.cs +++ b/src/Humanizer/ClockNotationRounding.cs @@ -1,4 +1,4 @@ -namespace Humanizer.Localisation.TimeToClockNotation +namespace Humanizer { public enum ClockNotationRounding { diff --git a/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs index 5167ed8c2..d295d808b 100644 --- a/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs +++ b/src/Humanizer/Localisation/TimeToClockNotation/BrazilianPortugueseTimeOnlyToClockNotationConverter.cs @@ -2,6 +2,8 @@ using System; +using Humanizer; + namespace Humanizer.Localisation.TimeToClockNotation { internal class BrazilianPortugueseTimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter diff --git a/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs index b06d37d18..b01954dca 100644 --- a/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs +++ b/src/Humanizer/Localisation/TimeToClockNotation/DefaultTimeOnlyToClockNotationConverter.cs @@ -2,6 +2,8 @@ using System; +using Humanizer; + namespace Humanizer.Localisation.TimeToClockNotation { internal class DefaultTimeOnlyToClockNotationConverter : ITimeOnlyToClockNotationConverter diff --git a/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs b/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs index b3d80fdcc..1920ebb72 100644 --- a/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs +++ b/src/Humanizer/Localisation/TimeToClockNotation/ITimeOnlyToClockNotationConverter.cs @@ -2,6 +2,8 @@ using System; +using Humanizer; + namespace Humanizer.Localisation.TimeToClockNotation { /// diff --git a/src/Humanizer/TimeOnlyToClockNotationExtensions.cs b/src/Humanizer/TimeOnlyToClockNotationExtensions.cs index 824d91637..aaa501b0a 100644 --- a/src/Humanizer/TimeOnlyToClockNotationExtensions.cs +++ b/src/Humanizer/TimeOnlyToClockNotationExtensions.cs @@ -1,6 +1,8 @@ #if NET6_0_OR_GREATER using System; + +using Humanizer; using Humanizer.Configuration; using Humanizer.Localisation.TimeToClockNotation;