From d8c61e894f32fe7ad95f7c3cf558eef3ec699fe5 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Wed, 7 Feb 2024 11:22:47 +1100 Subject: [PATCH] clean up templates --- src/Humanizer/FluentDate/In.Months.cs | 348 +- src/Humanizer/FluentDate/In.Months.tt | 49 +- src/Humanizer/FluentDate/In.SomeTimeFrom.cs | 2068 +++---- src/Humanizer/FluentDate/In.SomeTimeFrom.tt | 230 +- src/Humanizer/FluentDate/InDate.Months.cs | 343 +- src/Humanizer/FluentDate/InDate.Months.tt | 46 +- .../FluentDate/InDate.SomeTimeFrom.cs | 1788 +++--- .../FluentDate/InDate.SomeTimeFrom.tt | 198 +- src/Humanizer/FluentDate/On.Days.cs | 5446 +++++++---------- src/Humanizer/FluentDate/On.Days.tt | 63 +- src/Humanizer/FluentDate/OnDate.Days.cs | 5432 +++++++--------- src/Humanizer/FluentDate/OnDate.Days.tt | 62 +- 12 files changed, 6925 insertions(+), 9148 deletions(-) diff --git a/src/Humanizer/FluentDate/In.Months.cs b/src/Humanizer/FluentDate/In.Months.cs index 3e8cf85db..ba740ef1f 100644 --- a/src/Humanizer/FluentDate/In.Months.cs +++ b/src/Humanizer/FluentDate/In.Months.cs @@ -1,201 +1,151 @@ - -using System; +using System; -namespace Humanizer +namespace Humanizer; + +public partial class In { - public partial class In - { - - /// - /// Returns 1st of January of the current year - /// - public static DateTime January - { - get { return new DateTime(DateTime.UtcNow.Year, 1, 1); } - } - - /// - /// Returns 1st of January of the year passed in - /// - public static DateTime JanuaryOf(int year) - { - return new DateTime(year, 1, 1); - } - - /// - /// Returns 1st of February of the current year - /// - public static DateTime February - { - get { return new DateTime(DateTime.UtcNow.Year, 2, 1); } - } - - /// - /// Returns 1st of February of the year passed in - /// - public static DateTime FebruaryOf(int year) - { - return new DateTime(year, 2, 1); - } - - /// - /// Returns 1st of March of the current year - /// - public static DateTime March - { - get { return new DateTime(DateTime.UtcNow.Year, 3, 1); } - } - - /// - /// Returns 1st of March of the year passed in - /// - public static DateTime MarchOf(int year) - { - return new DateTime(year, 3, 1); - } - - /// - /// Returns 1st of April of the current year - /// - public static DateTime April - { - get { return new DateTime(DateTime.UtcNow.Year, 4, 1); } - } - - /// - /// Returns 1st of April of the year passed in - /// - public static DateTime AprilOf(int year) - { - return new DateTime(year, 4, 1); - } - - /// - /// Returns 1st of May of the current year - /// - public static DateTime May - { - get { return new DateTime(DateTime.UtcNow.Year, 5, 1); } - } - - /// - /// Returns 1st of May of the year passed in - /// - public static DateTime MayOf(int year) - { - return new DateTime(year, 5, 1); - } - - /// - /// Returns 1st of June of the current year - /// - public static DateTime June - { - get { return new DateTime(DateTime.UtcNow.Year, 6, 1); } - } - - /// - /// Returns 1st of June of the year passed in - /// - public static DateTime JuneOf(int year) - { - return new DateTime(year, 6, 1); - } - - /// - /// Returns 1st of July of the current year - /// - public static DateTime July - { - get { return new DateTime(DateTime.UtcNow.Year, 7, 1); } - } - - /// - /// Returns 1st of July of the year passed in - /// - public static DateTime JulyOf(int year) - { - return new DateTime(year, 7, 1); - } - - /// - /// Returns 1st of August of the current year - /// - public static DateTime August - { - get { return new DateTime(DateTime.UtcNow.Year, 8, 1); } - } - - /// - /// Returns 1st of August of the year passed in - /// - public static DateTime AugustOf(int year) - { - return new DateTime(year, 8, 1); - } - - /// - /// Returns 1st of September of the current year - /// - public static DateTime September - { - get { return new DateTime(DateTime.UtcNow.Year, 9, 1); } - } - - /// - /// Returns 1st of September of the year passed in - /// - public static DateTime SeptemberOf(int year) - { - return new DateTime(year, 9, 1); - } - - /// - /// Returns 1st of October of the current year - /// - public static DateTime October - { - get { return new DateTime(DateTime.UtcNow.Year, 10, 1); } - } - - /// - /// Returns 1st of October of the year passed in - /// - public static DateTime OctoberOf(int year) - { - return new DateTime(year, 10, 1); - } - - /// - /// Returns 1st of November of the current year - /// - public static DateTime November - { - get { return new DateTime(DateTime.UtcNow.Year, 11, 1); } - } - - /// - /// Returns 1st of November of the year passed in - /// - public static DateTime NovemberOf(int year) - { - return new DateTime(year, 11, 1); - } - - /// - /// Returns 1st of December of the current year - /// - public static DateTime December - { - get { return new DateTime(DateTime.UtcNow.Year, 12, 1); } - } - - /// - /// Returns 1st of December of the year passed in - /// - public static DateTime DecemberOf(int year) - { - return new DateTime(year, 12, 1); - } - } -} \ No newline at end of file + /// + /// Returns 1st of January of the current year + /// + public static DateTime January + => new(DateTime.UtcNow.Year, 1, 1); + + /// + /// Returns 1st of January of the year passed in + /// + public static DateTime JanuaryOf(int year) + => new(year, 1, 1); + + /// + /// Returns 1st of February of the current year + /// + public static DateTime February + => new(DateTime.UtcNow.Year, 2, 1); + + /// + /// Returns 1st of February of the year passed in + /// + public static DateTime FebruaryOf(int year) + => new(year, 2, 1); + + /// + /// Returns 1st of March of the current year + /// + public static DateTime March + => new(DateTime.UtcNow.Year, 3, 1); + + /// + /// Returns 1st of March of the year passed in + /// + public static DateTime MarchOf(int year) + => new(year, 3, 1); + + /// + /// Returns 1st of April of the current year + /// + public static DateTime April + => new(DateTime.UtcNow.Year, 4, 1); + + /// + /// Returns 1st of April of the year passed in + /// + public static DateTime AprilOf(int year) + => new(year, 4, 1); + + /// + /// Returns 1st of May of the current year + /// + public static DateTime May + => new(DateTime.UtcNow.Year, 5, 1); + + /// + /// Returns 1st of May of the year passed in + /// + public static DateTime MayOf(int year) + => new(year, 5, 1); + + /// + /// Returns 1st of June of the current year + /// + public static DateTime June + => new(DateTime.UtcNow.Year, 6, 1); + + /// + /// Returns 1st of June of the year passed in + /// + public static DateTime JuneOf(int year) + => new(year, 6, 1); + + /// + /// Returns 1st of July of the current year + /// + public static DateTime July + => new(DateTime.UtcNow.Year, 7, 1); + + /// + /// Returns 1st of July of the year passed in + /// + public static DateTime JulyOf(int year) + => new(year, 7, 1); + + /// + /// Returns 1st of August of the current year + /// + public static DateTime August + => new(DateTime.UtcNow.Year, 8, 1); + + /// + /// Returns 1st of August of the year passed in + /// + public static DateTime AugustOf(int year) + => new(year, 8, 1); + + /// + /// Returns 1st of September of the current year + /// + public static DateTime September + => new(DateTime.UtcNow.Year, 9, 1); + + /// + /// Returns 1st of September of the year passed in + /// + public static DateTime SeptemberOf(int year) + => new(year, 9, 1); + + /// + /// Returns 1st of October of the current year + /// + public static DateTime October + => new(DateTime.UtcNow.Year, 10, 1); + + /// + /// Returns 1st of October of the year passed in + /// + public static DateTime OctoberOf(int year) + => new(year, 10, 1); + + /// + /// Returns 1st of November of the current year + /// + public static DateTime November + => new(DateTime.UtcNow.Year, 11, 1); + + /// + /// Returns 1st of November of the year passed in + /// + public static DateTime NovemberOf(int year) + => new(year, 11, 1); + + /// + /// Returns 1st of December of the current year + /// + public static DateTime December + => new(DateTime.UtcNow.Year, 12, 1); + + /// + /// Returns 1st of December of the year passed in + /// + public static DateTime DecemberOf(int year) + => new(year, 12, 1); + +} diff --git a/src/Humanizer/FluentDate/In.Months.tt b/src/Humanizer/FluentDate/In.Months.tt index 526a555ba..15911069b 100644 --- a/src/Humanizer/FluentDate/In.Months.tt +++ b/src/Humanizer/FluentDate/In.Months.tt @@ -7,35 +7,30 @@ <#@ import namespace="System.Diagnostics" #> <#@ import namespace="System.Linq" #> <#@ import namespace="System.Collections" #> -<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Collections.Generic" #> using System; -namespace Humanizer +namespace Humanizer; + +public partial class In { - public partial class In - { - <#var now = DateTime.Now; - for (int i = 0; i < 12; i++){ - var monthName = new DateTime(now.Year, i + 1, 1).ToString("MMMM"); - #> - /// - /// Returns 1st of <#= monthName #> of the current year - /// - public static DateTime <#= monthName #> - { - get { return new DateTime(DateTime.UtcNow.Year, <#= i + 1 #>, 1); } - } +<#var now = DateTime.Now; +for (int i = 0; i < 12; i++){ + var monthName = new DateTime(now.Year, i + 1, 1).ToString("MMMM"); +#> + /// + /// Returns 1st of <#= monthName #> of the current year + /// + public static DateTime <#= monthName #> + => new(DateTime.UtcNow.Year, <#= i + 1 #>, 1); + + /// + /// Returns 1st of <#= monthName #> of the year passed in + /// + public static DateTime <#= monthName#>Of(int year) + => new(year, <#= i + 1 #>, 1); - /// - /// Returns 1st of <#= monthName #> of the year passed in - /// - public static DateTime <#= monthName#>Of(int year) - { - return new DateTime(year, <#= i + 1 #>, 1); - } - <# - } +<#} - #> - } -} \ No newline at end of file +#> +} diff --git a/src/Humanizer/FluentDate/In.SomeTimeFrom.cs b/src/Humanizer/FluentDate/In.SomeTimeFrom.cs index cac1da132..61ab1cfa6 100644 --- a/src/Humanizer/FluentDate/In.SomeTimeFrom.cs +++ b/src/Humanizer/FluentDate/In.SomeTimeFrom.cs @@ -1,1181 +1,899 @@ - -using System; +using System; -namespace Humanizer +namespace Humanizer; + +/// +/// +public partial class In { /// /// - public partial class In + public static class One + { + /// + /// 1 seconds from now + /// + public static DateTime Second + => DateTime.UtcNow.AddSeconds(1); + + /// + /// 1 seconds from the provided date + /// + public static DateTime SecondFrom(DateTime date) + => date.AddSeconds(1); + + /// + /// 1 minutes from now + /// + public static DateTime Minute + => DateTime.UtcNow.AddMinutes(1); + + /// + /// 1 minutes from the provided date + /// + public static DateTime MinuteFrom(DateTime date) + => date.AddMinutes(1); + + /// + /// 1 hours from now + /// + public static DateTime Hour + => DateTime.UtcNow.AddHours(1); + + /// + /// 1 hours from the provided date + /// + public static DateTime HourFrom(DateTime date) + => date.AddHours(1); + + /// + /// 1 days from now + /// + public static DateTime Day + => DateTime.UtcNow.AddDays(1); + + /// + /// 1 days from the provided date + /// + public static DateTime DayFrom(DateTime date) + => date.AddDays(1); + + /// + /// 1 weeks from now + /// + public static DateTime Week + => DateTime.UtcNow.AddDays(7); + + /// + /// 1 weeks from the provided date + /// + public static DateTime WeekFrom(DateTime date) + => date.AddDays(7); + + /// + /// 1 months from now + /// + public static DateTime Month + => DateTime.UtcNow.AddMonths(1); + + /// + /// 1 months from the provided date + /// + public static DateTime MonthFrom(DateTime date) + => date.AddMonths(1); + + /// + /// 1 years from now + /// + public static DateTime Year + => DateTime.UtcNow.AddYears(1); + + /// + /// 1 years from the provided date + /// + public static DateTime YearFrom(DateTime date) + => date.AddYears(1); + } + + /// + /// + public static class Two + { + /// + /// 2 seconds from now + /// + public static DateTime Seconds + => DateTime.UtcNow.AddSeconds(2); + + /// + /// 2 seconds from the provided date + /// + public static DateTime SecondsFrom(DateTime date) + => date.AddSeconds(2); + + /// + /// 2 minutes from now + /// + public static DateTime Minutes + => DateTime.UtcNow.AddMinutes(2); + + /// + /// 2 minutes from the provided date + /// + public static DateTime MinutesFrom(DateTime date) + => date.AddMinutes(2); + + /// + /// 2 hours from now + /// + public static DateTime Hours + => DateTime.UtcNow.AddHours(2); + + /// + /// 2 hours from the provided date + /// + public static DateTime HoursFrom(DateTime date) + => date.AddHours(2); + + /// + /// 2 days from now + /// + public static DateTime Days + => DateTime.UtcNow.AddDays(2); + + /// + /// 2 days from the provided date + /// + public static DateTime DaysFrom(DateTime date) + => date.AddDays(2); + + /// + /// 2 weeks from now + /// + public static DateTime Weeks + => DateTime.UtcNow.AddDays(14); + + /// + /// 2 weeks from the provided date + /// + public static DateTime WeeksFrom(DateTime date) + => date.AddDays(14); + + /// + /// 2 months from now + /// + public static DateTime Months + => DateTime.UtcNow.AddMonths(2); + + /// + /// 2 months from the provided date + /// + public static DateTime MonthsFrom(DateTime date) + => date.AddMonths(2); + + /// + /// 2 years from now + /// + public static DateTime Years + => DateTime.UtcNow.AddYears(2); + + /// + /// 2 years from the provided date + /// + public static DateTime YearsFrom(DateTime date) + => date.AddYears(2); + } + + /// + /// + public static class Three + { + /// + /// 3 seconds from now + /// + public static DateTime Seconds + => DateTime.UtcNow.AddSeconds(3); + + /// + /// 3 seconds from the provided date + /// + public static DateTime SecondsFrom(DateTime date) + => date.AddSeconds(3); + + /// + /// 3 minutes from now + /// + public static DateTime Minutes + => DateTime.UtcNow.AddMinutes(3); + + /// + /// 3 minutes from the provided date + /// + public static DateTime MinutesFrom(DateTime date) + => date.AddMinutes(3); + + /// + /// 3 hours from now + /// + public static DateTime Hours + => DateTime.UtcNow.AddHours(3); + + /// + /// 3 hours from the provided date + /// + public static DateTime HoursFrom(DateTime date) + => date.AddHours(3); + + /// + /// 3 days from now + /// + public static DateTime Days + => DateTime.UtcNow.AddDays(3); + + /// + /// 3 days from the provided date + /// + public static DateTime DaysFrom(DateTime date) + => date.AddDays(3); + + /// + /// 3 weeks from now + /// + public static DateTime Weeks + => DateTime.UtcNow.AddDays(21); + + /// + /// 3 weeks from the provided date + /// + public static DateTime WeeksFrom(DateTime date) + => date.AddDays(21); + + /// + /// 3 months from now + /// + public static DateTime Months + => DateTime.UtcNow.AddMonths(3); + + /// + /// 3 months from the provided date + /// + public static DateTime MonthsFrom(DateTime date) + => date.AddMonths(3); + + /// + /// 3 years from now + /// + public static DateTime Years + => DateTime.UtcNow.AddYears(3); + + /// + /// 3 years from the provided date + /// + public static DateTime YearsFrom(DateTime date) + => date.AddYears(3); + } + + /// + /// + public static class Four + { + /// + /// 4 seconds from now + /// + public static DateTime Seconds + => DateTime.UtcNow.AddSeconds(4); + + /// + /// 4 seconds from the provided date + /// + public static DateTime SecondsFrom(DateTime date) + => date.AddSeconds(4); + + /// + /// 4 minutes from now + /// + public static DateTime Minutes + => DateTime.UtcNow.AddMinutes(4); + + /// + /// 4 minutes from the provided date + /// + public static DateTime MinutesFrom(DateTime date) + => date.AddMinutes(4); + + /// + /// 4 hours from now + /// + public static DateTime Hours + => DateTime.UtcNow.AddHours(4); + + /// + /// 4 hours from the provided date + /// + public static DateTime HoursFrom(DateTime date) + => date.AddHours(4); + + /// + /// 4 days from now + /// + public static DateTime Days + => DateTime.UtcNow.AddDays(4); + + /// + /// 4 days from the provided date + /// + public static DateTime DaysFrom(DateTime date) + => date.AddDays(4); + + /// + /// 4 weeks from now + /// + public static DateTime Weeks + => DateTime.UtcNow.AddDays(28); + + /// + /// 4 weeks from the provided date + /// + public static DateTime WeeksFrom(DateTime date) + => date.AddDays(28); + + /// + /// 4 months from now + /// + public static DateTime Months + => DateTime.UtcNow.AddMonths(4); + + /// + /// 4 months from the provided date + /// + public static DateTime MonthsFrom(DateTime date) + => date.AddMonths(4); + + /// + /// 4 years from now + /// + public static DateTime Years + => DateTime.UtcNow.AddYears(4); + + /// + /// 4 years from the provided date + /// + public static DateTime YearsFrom(DateTime date) + => date.AddYears(4); + } + + /// + /// + public static class Five + { + /// + /// 5 seconds from now + /// + public static DateTime Seconds + => DateTime.UtcNow.AddSeconds(5); + + /// + /// 5 seconds from the provided date + /// + public static DateTime SecondsFrom(DateTime date) + => date.AddSeconds(5); + + /// + /// 5 minutes from now + /// + public static DateTime Minutes + => DateTime.UtcNow.AddMinutes(5); + + /// + /// 5 minutes from the provided date + /// + public static DateTime MinutesFrom(DateTime date) + => date.AddMinutes(5); + + /// + /// 5 hours from now + /// + public static DateTime Hours + => DateTime.UtcNow.AddHours(5); + + /// + /// 5 hours from the provided date + /// + public static DateTime HoursFrom(DateTime date) + => date.AddHours(5); + + /// + /// 5 days from now + /// + public static DateTime Days + => DateTime.UtcNow.AddDays(5); + + /// + /// 5 days from the provided date + /// + public static DateTime DaysFrom(DateTime date) + => date.AddDays(5); + + /// + /// 5 weeks from now + /// + public static DateTime Weeks + => DateTime.UtcNow.AddDays(35); + + /// + /// 5 weeks from the provided date + /// + public static DateTime WeeksFrom(DateTime date) + => date.AddDays(35); + + /// + /// 5 months from now + /// + public static DateTime Months + => DateTime.UtcNow.AddMonths(5); + + /// + /// 5 months from the provided date + /// + public static DateTime MonthsFrom(DateTime date) + => date.AddMonths(5); + + /// + /// 5 years from now + /// + public static DateTime Years + => DateTime.UtcNow.AddYears(5); + + /// + /// 5 years from the provided date + /// + public static DateTime YearsFrom(DateTime date) + => date.AddYears(5); + } + + /// + /// + public static class Six + { + /// + /// 6 seconds from now + /// + public static DateTime Seconds + => DateTime.UtcNow.AddSeconds(6); + + /// + /// 6 seconds from the provided date + /// + public static DateTime SecondsFrom(DateTime date) + => date.AddSeconds(6); + + /// + /// 6 minutes from now + /// + public static DateTime Minutes + => DateTime.UtcNow.AddMinutes(6); + + /// + /// 6 minutes from the provided date + /// + public static DateTime MinutesFrom(DateTime date) + => date.AddMinutes(6); + + /// + /// 6 hours from now + /// + public static DateTime Hours + => DateTime.UtcNow.AddHours(6); + + /// + /// 6 hours from the provided date + /// + public static DateTime HoursFrom(DateTime date) + => date.AddHours(6); + + /// + /// 6 days from now + /// + public static DateTime Days + => DateTime.UtcNow.AddDays(6); + + /// + /// 6 days from the provided date + /// + public static DateTime DaysFrom(DateTime date) + => date.AddDays(6); + + /// + /// 6 weeks from now + /// + public static DateTime Weeks + => DateTime.UtcNow.AddDays(42); + + /// + /// 6 weeks from the provided date + /// + public static DateTime WeeksFrom(DateTime date) + => date.AddDays(42); + + /// + /// 6 months from now + /// + public static DateTime Months + => DateTime.UtcNow.AddMonths(6); + + /// + /// 6 months from the provided date + /// + public static DateTime MonthsFrom(DateTime date) + => date.AddMonths(6); + + /// + /// 6 years from now + /// + public static DateTime Years + => DateTime.UtcNow.AddYears(6); + + /// + /// 6 years from the provided date + /// + public static DateTime YearsFrom(DateTime date) + => date.AddYears(6); + } + + /// + /// + public static class Seven + { + /// + /// 7 seconds from now + /// + public static DateTime Seconds + => DateTime.UtcNow.AddSeconds(7); + + /// + /// 7 seconds from the provided date + /// + public static DateTime SecondsFrom(DateTime date) + => date.AddSeconds(7); + + /// + /// 7 minutes from now + /// + public static DateTime Minutes + => DateTime.UtcNow.AddMinutes(7); + + /// + /// 7 minutes from the provided date + /// + public static DateTime MinutesFrom(DateTime date) + => date.AddMinutes(7); + + /// + /// 7 hours from now + /// + public static DateTime Hours + => DateTime.UtcNow.AddHours(7); + + /// + /// 7 hours from the provided date + /// + public static DateTime HoursFrom(DateTime date) + => date.AddHours(7); + + /// + /// 7 days from now + /// + public static DateTime Days + => DateTime.UtcNow.AddDays(7); + + /// + /// 7 days from the provided date + /// + public static DateTime DaysFrom(DateTime date) + => date.AddDays(7); + + /// + /// 7 weeks from now + /// + public static DateTime Weeks + => DateTime.UtcNow.AddDays(49); + + /// + /// 7 weeks from the provided date + /// + public static DateTime WeeksFrom(DateTime date) + => date.AddDays(49); + + /// + /// 7 months from now + /// + public static DateTime Months + => DateTime.UtcNow.AddMonths(7); + + /// + /// 7 months from the provided date + /// + public static DateTime MonthsFrom(DateTime date) + => date.AddMonths(7); + + /// + /// 7 years from now + /// + public static DateTime Years + => DateTime.UtcNow.AddYears(7); + + /// + /// 7 years from the provided date + /// + public static DateTime YearsFrom(DateTime date) + => date.AddYears(7); + } + + /// + /// + public static class Eight + { + /// + /// 8 seconds from now + /// + public static DateTime Seconds + => DateTime.UtcNow.AddSeconds(8); + + /// + /// 8 seconds from the provided date + /// + public static DateTime SecondsFrom(DateTime date) + => date.AddSeconds(8); + + /// + /// 8 minutes from now + /// + public static DateTime Minutes + => DateTime.UtcNow.AddMinutes(8); + + /// + /// 8 minutes from the provided date + /// + public static DateTime MinutesFrom(DateTime date) + => date.AddMinutes(8); + + /// + /// 8 hours from now + /// + public static DateTime Hours + => DateTime.UtcNow.AddHours(8); + + /// + /// 8 hours from the provided date + /// + public static DateTime HoursFrom(DateTime date) + => date.AddHours(8); + + /// + /// 8 days from now + /// + public static DateTime Days + => DateTime.UtcNow.AddDays(8); + + /// + /// 8 days from the provided date + /// + public static DateTime DaysFrom(DateTime date) + => date.AddDays(8); + + /// + /// 8 weeks from now + /// + public static DateTime Weeks + => DateTime.UtcNow.AddDays(56); + + /// + /// 8 weeks from the provided date + /// + public static DateTime WeeksFrom(DateTime date) + => date.AddDays(56); + + /// + /// 8 months from now + /// + public static DateTime Months + => DateTime.UtcNow.AddMonths(8); + + /// + /// 8 months from the provided date + /// + public static DateTime MonthsFrom(DateTime date) + => date.AddMonths(8); + + /// + /// 8 years from now + /// + public static DateTime Years + => DateTime.UtcNow.AddYears(8); + + /// + /// 8 years from the provided date + /// + public static DateTime YearsFrom(DateTime date) + => date.AddYears(8); + } + + /// + /// + public static class Nine + { + /// + /// 9 seconds from now + /// + public static DateTime Seconds + => DateTime.UtcNow.AddSeconds(9); + + /// + /// 9 seconds from the provided date + /// + public static DateTime SecondsFrom(DateTime date) + => date.AddSeconds(9); + + /// + /// 9 minutes from now + /// + public static DateTime Minutes + => DateTime.UtcNow.AddMinutes(9); + + /// + /// 9 minutes from the provided date + /// + public static DateTime MinutesFrom(DateTime date) + => date.AddMinutes(9); + + /// + /// 9 hours from now + /// + public static DateTime Hours + => DateTime.UtcNow.AddHours(9); + + /// + /// 9 hours from the provided date + /// + public static DateTime HoursFrom(DateTime date) + => date.AddHours(9); + + /// + /// 9 days from now + /// + public static DateTime Days + => DateTime.UtcNow.AddDays(9); + + /// + /// 9 days from the provided date + /// + public static DateTime DaysFrom(DateTime date) + => date.AddDays(9); + + /// + /// 9 weeks from now + /// + public static DateTime Weeks + => DateTime.UtcNow.AddDays(63); + + /// + /// 9 weeks from the provided date + /// + public static DateTime WeeksFrom(DateTime date) + => date.AddDays(63); + + /// + /// 9 months from now + /// + public static DateTime Months + => DateTime.UtcNow.AddMonths(9); + + /// + /// 9 months from the provided date + /// + public static DateTime MonthsFrom(DateTime date) + => date.AddMonths(9); + + /// + /// 9 years from now + /// + public static DateTime Years + => DateTime.UtcNow.AddYears(9); + + /// + /// 9 years from the provided date + /// + public static DateTime YearsFrom(DateTime date) + => date.AddYears(9); + } + + /// + /// + public static class Ten { - - /// - /// - public static class One - { - /// - /// 1 seconds from now - /// - public static DateTime Second - { - get { return DateTime.UtcNow.AddSeconds(1); } - } - - /// - /// 1 seconds from the provided date - /// - public static DateTime SecondFrom(DateTime date) - { - return date.AddSeconds(1); - } - - /// - /// 1 minutes from now - /// - public static DateTime Minute - { - get { return DateTime.UtcNow.AddMinutes(1); } - } - - /// - /// 1 minutes from the provided date - /// - public static DateTime MinuteFrom(DateTime date) - { - return date.AddMinutes(1); - } - - /// - /// 1 hours from now - /// - public static DateTime Hour - { - get { return DateTime.UtcNow.AddHours(1); } - } - - /// - /// 1 hours from the provided date - /// - public static DateTime HourFrom(DateTime date) - { - return date.AddHours(1); - } - - /// - /// 1 days from now - /// - public static DateTime Day - { - get { return DateTime.UtcNow.AddDays(1); } - } - - /// - /// 1 days from the provided date - /// - public static DateTime DayFrom(DateTime date) - { - return date.AddDays(1); - } - - /// - /// 1 weeks from now - /// - public static DateTime Week - { - get { return DateTime.UtcNow.AddDays(7); } - } - - /// - /// 1 weeks from the provided date - /// - public static DateTime WeekFrom(DateTime date) - { - return date.AddDays(7); - } - - /// - /// 1 months from now - /// - public static DateTime Month - { - get { return DateTime.UtcNow.AddMonths(1); } - } - - /// - /// 1 months from the provided date - /// - public static DateTime MonthFrom(DateTime date) - { - return date.AddMonths(1); - } - - /// - /// 1 years from now - /// - public static DateTime Year - { - get { return DateTime.UtcNow.AddYears(1); } - } - - /// - /// 1 years from the provided date - /// - public static DateTime YearFrom(DateTime date) - { - return date.AddYears(1); - } - } - - /// - /// - public static class Two - { - /// - /// 2 seconds from now - /// - public static DateTime Seconds - { - get { return DateTime.UtcNow.AddSeconds(2); } - } - - /// - /// 2 seconds from the provided date - /// - public static DateTime SecondsFrom(DateTime date) - { - return date.AddSeconds(2); - } - - /// - /// 2 minutes from now - /// - public static DateTime Minutes - { - get { return DateTime.UtcNow.AddMinutes(2); } - } - - /// - /// 2 minutes from the provided date - /// - public static DateTime MinutesFrom(DateTime date) - { - return date.AddMinutes(2); - } - - /// - /// 2 hours from now - /// - public static DateTime Hours - { - get { return DateTime.UtcNow.AddHours(2); } - } - - /// - /// 2 hours from the provided date - /// - public static DateTime HoursFrom(DateTime date) - { - return date.AddHours(2); - } - - /// - /// 2 days from now - /// - public static DateTime Days - { - get { return DateTime.UtcNow.AddDays(2); } - } - - /// - /// 2 days from the provided date - /// - public static DateTime DaysFrom(DateTime date) - { - return date.AddDays(2); - } - - /// - /// 2 weeks from now - /// - public static DateTime Weeks - { - get { return DateTime.UtcNow.AddDays(14); } - } - - /// - /// 2 weeks from the provided date - /// - public static DateTime WeeksFrom(DateTime date) - { - return date.AddDays(14); - } - - /// - /// 2 months from now - /// - public static DateTime Months - { - get { return DateTime.UtcNow.AddMonths(2); } - } - - /// - /// 2 months from the provided date - /// - public static DateTime MonthsFrom(DateTime date) - { - return date.AddMonths(2); - } - - /// - /// 2 years from now - /// - public static DateTime Years - { - get { return DateTime.UtcNow.AddYears(2); } - } - - /// - /// 2 years from the provided date - /// - public static DateTime YearsFrom(DateTime date) - { - return date.AddYears(2); - } - } - - /// - /// - public static class Three - { - /// - /// 3 seconds from now - /// - public static DateTime Seconds - { - get { return DateTime.UtcNow.AddSeconds(3); } - } - - /// - /// 3 seconds from the provided date - /// - public static DateTime SecondsFrom(DateTime date) - { - return date.AddSeconds(3); - } - - /// - /// 3 minutes from now - /// - public static DateTime Minutes - { - get { return DateTime.UtcNow.AddMinutes(3); } - } - - /// - /// 3 minutes from the provided date - /// - public static DateTime MinutesFrom(DateTime date) - { - return date.AddMinutes(3); - } - - /// - /// 3 hours from now - /// - public static DateTime Hours - { - get { return DateTime.UtcNow.AddHours(3); } - } - - /// - /// 3 hours from the provided date - /// - public static DateTime HoursFrom(DateTime date) - { - return date.AddHours(3); - } - - /// - /// 3 days from now - /// - public static DateTime Days - { - get { return DateTime.UtcNow.AddDays(3); } - } - - /// - /// 3 days from the provided date - /// - public static DateTime DaysFrom(DateTime date) - { - return date.AddDays(3); - } - - /// - /// 3 weeks from now - /// - public static DateTime Weeks - { - get { return DateTime.UtcNow.AddDays(21); } - } - - /// - /// 3 weeks from the provided date - /// - public static DateTime WeeksFrom(DateTime date) - { - return date.AddDays(21); - } - - /// - /// 3 months from now - /// - public static DateTime Months - { - get { return DateTime.UtcNow.AddMonths(3); } - } - - /// - /// 3 months from the provided date - /// - public static DateTime MonthsFrom(DateTime date) - { - return date.AddMonths(3); - } - - /// - /// 3 years from now - /// - public static DateTime Years - { - get { return DateTime.UtcNow.AddYears(3); } - } - - /// - /// 3 years from the provided date - /// - public static DateTime YearsFrom(DateTime date) - { - return date.AddYears(3); - } - } - - /// - /// - public static class Four - { - /// - /// 4 seconds from now - /// - public static DateTime Seconds - { - get { return DateTime.UtcNow.AddSeconds(4); } - } - - /// - /// 4 seconds from the provided date - /// - public static DateTime SecondsFrom(DateTime date) - { - return date.AddSeconds(4); - } - - /// - /// 4 minutes from now - /// - public static DateTime Minutes - { - get { return DateTime.UtcNow.AddMinutes(4); } - } - - /// - /// 4 minutes from the provided date - /// - public static DateTime MinutesFrom(DateTime date) - { - return date.AddMinutes(4); - } - - /// - /// 4 hours from now - /// - public static DateTime Hours - { - get { return DateTime.UtcNow.AddHours(4); } - } - - /// - /// 4 hours from the provided date - /// - public static DateTime HoursFrom(DateTime date) - { - return date.AddHours(4); - } - - /// - /// 4 days from now - /// - public static DateTime Days - { - get { return DateTime.UtcNow.AddDays(4); } - } - - /// - /// 4 days from the provided date - /// - public static DateTime DaysFrom(DateTime date) - { - return date.AddDays(4); - } - - /// - /// 4 weeks from now - /// - public static DateTime Weeks - { - get { return DateTime.UtcNow.AddDays(28); } - } - - /// - /// 4 weeks from the provided date - /// - public static DateTime WeeksFrom(DateTime date) - { - return date.AddDays(28); - } - - /// - /// 4 months from now - /// - public static DateTime Months - { - get { return DateTime.UtcNow.AddMonths(4); } - } - - /// - /// 4 months from the provided date - /// - public static DateTime MonthsFrom(DateTime date) - { - return date.AddMonths(4); - } - - /// - /// 4 years from now - /// - public static DateTime Years - { - get { return DateTime.UtcNow.AddYears(4); } - } - - /// - /// 4 years from the provided date - /// - public static DateTime YearsFrom(DateTime date) - { - return date.AddYears(4); - } - } - - /// - /// - public static class Five - { - /// - /// 5 seconds from now - /// - public static DateTime Seconds - { - get { return DateTime.UtcNow.AddSeconds(5); } - } - - /// - /// 5 seconds from the provided date - /// - public static DateTime SecondsFrom(DateTime date) - { - return date.AddSeconds(5); - } - - /// - /// 5 minutes from now - /// - public static DateTime Minutes - { - get { return DateTime.UtcNow.AddMinutes(5); } - } - - /// - /// 5 minutes from the provided date - /// - public static DateTime MinutesFrom(DateTime date) - { - return date.AddMinutes(5); - } - - /// - /// 5 hours from now - /// - public static DateTime Hours - { - get { return DateTime.UtcNow.AddHours(5); } - } - - /// - /// 5 hours from the provided date - /// - public static DateTime HoursFrom(DateTime date) - { - return date.AddHours(5); - } - - /// - /// 5 days from now - /// - public static DateTime Days - { - get { return DateTime.UtcNow.AddDays(5); } - } - - /// - /// 5 days from the provided date - /// - public static DateTime DaysFrom(DateTime date) - { - return date.AddDays(5); - } - - /// - /// 5 weeks from now - /// - public static DateTime Weeks - { - get { return DateTime.UtcNow.AddDays(35); } - } - - /// - /// 5 weeks from the provided date - /// - public static DateTime WeeksFrom(DateTime date) - { - return date.AddDays(35); - } - - /// - /// 5 months from now - /// - public static DateTime Months - { - get { return DateTime.UtcNow.AddMonths(5); } - } - - /// - /// 5 months from the provided date - /// - public static DateTime MonthsFrom(DateTime date) - { - return date.AddMonths(5); - } - - /// - /// 5 years from now - /// - public static DateTime Years - { - get { return DateTime.UtcNow.AddYears(5); } - } - - /// - /// 5 years from the provided date - /// - public static DateTime YearsFrom(DateTime date) - { - return date.AddYears(5); - } - } - - /// - /// - public static class Six - { - /// - /// 6 seconds from now - /// - public static DateTime Seconds - { - get { return DateTime.UtcNow.AddSeconds(6); } - } - - /// - /// 6 seconds from the provided date - /// - public static DateTime SecondsFrom(DateTime date) - { - return date.AddSeconds(6); - } - - /// - /// 6 minutes from now - /// - public static DateTime Minutes - { - get { return DateTime.UtcNow.AddMinutes(6); } - } - - /// - /// 6 minutes from the provided date - /// - public static DateTime MinutesFrom(DateTime date) - { - return date.AddMinutes(6); - } - - /// - /// 6 hours from now - /// - public static DateTime Hours - { - get { return DateTime.UtcNow.AddHours(6); } - } - - /// - /// 6 hours from the provided date - /// - public static DateTime HoursFrom(DateTime date) - { - return date.AddHours(6); - } - - /// - /// 6 days from now - /// - public static DateTime Days - { - get { return DateTime.UtcNow.AddDays(6); } - } - - /// - /// 6 days from the provided date - /// - public static DateTime DaysFrom(DateTime date) - { - return date.AddDays(6); - } - - /// - /// 6 weeks from now - /// - public static DateTime Weeks - { - get { return DateTime.UtcNow.AddDays(42); } - } - - /// - /// 6 weeks from the provided date - /// - public static DateTime WeeksFrom(DateTime date) - { - return date.AddDays(42); - } - - /// - /// 6 months from now - /// - public static DateTime Months - { - get { return DateTime.UtcNow.AddMonths(6); } - } - - /// - /// 6 months from the provided date - /// - public static DateTime MonthsFrom(DateTime date) - { - return date.AddMonths(6); - } - - /// - /// 6 years from now - /// - public static DateTime Years - { - get { return DateTime.UtcNow.AddYears(6); } - } - - /// - /// 6 years from the provided date - /// - public static DateTime YearsFrom(DateTime date) - { - return date.AddYears(6); - } - } - - /// - /// - public static class Seven - { - /// - /// 7 seconds from now - /// - public static DateTime Seconds - { - get { return DateTime.UtcNow.AddSeconds(7); } - } - - /// - /// 7 seconds from the provided date - /// - public static DateTime SecondsFrom(DateTime date) - { - return date.AddSeconds(7); - } - - /// - /// 7 minutes from now - /// - public static DateTime Minutes - { - get { return DateTime.UtcNow.AddMinutes(7); } - } - - /// - /// 7 minutes from the provided date - /// - public static DateTime MinutesFrom(DateTime date) - { - return date.AddMinutes(7); - } - - /// - /// 7 hours from now - /// - public static DateTime Hours - { - get { return DateTime.UtcNow.AddHours(7); } - } - - /// - /// 7 hours from the provided date - /// - public static DateTime HoursFrom(DateTime date) - { - return date.AddHours(7); - } - - /// - /// 7 days from now - /// - public static DateTime Days - { - get { return DateTime.UtcNow.AddDays(7); } - } - - /// - /// 7 days from the provided date - /// - public static DateTime DaysFrom(DateTime date) - { - return date.AddDays(7); - } - - /// - /// 7 weeks from now - /// - public static DateTime Weeks - { - get { return DateTime.UtcNow.AddDays(49); } - } - - /// - /// 7 weeks from the provided date - /// - public static DateTime WeeksFrom(DateTime date) - { - return date.AddDays(49); - } - - /// - /// 7 months from now - /// - public static DateTime Months - { - get { return DateTime.UtcNow.AddMonths(7); } - } - - /// - /// 7 months from the provided date - /// - public static DateTime MonthsFrom(DateTime date) - { - return date.AddMonths(7); - } - - /// - /// 7 years from now - /// - public static DateTime Years - { - get { return DateTime.UtcNow.AddYears(7); } - } - - /// - /// 7 years from the provided date - /// - public static DateTime YearsFrom(DateTime date) - { - return date.AddYears(7); - } - } - - /// - /// - public static class Eight - { - /// - /// 8 seconds from now - /// - public static DateTime Seconds - { - get { return DateTime.UtcNow.AddSeconds(8); } - } - - /// - /// 8 seconds from the provided date - /// - public static DateTime SecondsFrom(DateTime date) - { - return date.AddSeconds(8); - } - - /// - /// 8 minutes from now - /// - public static DateTime Minutes - { - get { return DateTime.UtcNow.AddMinutes(8); } - } - - /// - /// 8 minutes from the provided date - /// - public static DateTime MinutesFrom(DateTime date) - { - return date.AddMinutes(8); - } - - /// - /// 8 hours from now - /// - public static DateTime Hours - { - get { return DateTime.UtcNow.AddHours(8); } - } - - /// - /// 8 hours from the provided date - /// - public static DateTime HoursFrom(DateTime date) - { - return date.AddHours(8); - } - - /// - /// 8 days from now - /// - public static DateTime Days - { - get { return DateTime.UtcNow.AddDays(8); } - } - - /// - /// 8 days from the provided date - /// - public static DateTime DaysFrom(DateTime date) - { - return date.AddDays(8); - } - - /// - /// 8 weeks from now - /// - public static DateTime Weeks - { - get { return DateTime.UtcNow.AddDays(56); } - } - - /// - /// 8 weeks from the provided date - /// - public static DateTime WeeksFrom(DateTime date) - { - return date.AddDays(56); - } - - /// - /// 8 months from now - /// - public static DateTime Months - { - get { return DateTime.UtcNow.AddMonths(8); } - } - - /// - /// 8 months from the provided date - /// - public static DateTime MonthsFrom(DateTime date) - { - return date.AddMonths(8); - } - - /// - /// 8 years from now - /// - public static DateTime Years - { - get { return DateTime.UtcNow.AddYears(8); } - } - - /// - /// 8 years from the provided date - /// - public static DateTime YearsFrom(DateTime date) - { - return date.AddYears(8); - } - } - - /// - /// - public static class Nine - { - /// - /// 9 seconds from now - /// - public static DateTime Seconds - { - get { return DateTime.UtcNow.AddSeconds(9); } - } - - /// - /// 9 seconds from the provided date - /// - public static DateTime SecondsFrom(DateTime date) - { - return date.AddSeconds(9); - } - - /// - /// 9 minutes from now - /// - public static DateTime Minutes - { - get { return DateTime.UtcNow.AddMinutes(9); } - } - - /// - /// 9 minutes from the provided date - /// - public static DateTime MinutesFrom(DateTime date) - { - return date.AddMinutes(9); - } - - /// - /// 9 hours from now - /// - public static DateTime Hours - { - get { return DateTime.UtcNow.AddHours(9); } - } - - /// - /// 9 hours from the provided date - /// - public static DateTime HoursFrom(DateTime date) - { - return date.AddHours(9); - } - - /// - /// 9 days from now - /// - public static DateTime Days - { - get { return DateTime.UtcNow.AddDays(9); } - } - - /// - /// 9 days from the provided date - /// - public static DateTime DaysFrom(DateTime date) - { - return date.AddDays(9); - } - - /// - /// 9 weeks from now - /// - public static DateTime Weeks - { - get { return DateTime.UtcNow.AddDays(63); } - } - - /// - /// 9 weeks from the provided date - /// - public static DateTime WeeksFrom(DateTime date) - { - return date.AddDays(63); - } - - /// - /// 9 months from now - /// - public static DateTime Months - { - get { return DateTime.UtcNow.AddMonths(9); } - } - - /// - /// 9 months from the provided date - /// - public static DateTime MonthsFrom(DateTime date) - { - return date.AddMonths(9); - } - - /// - /// 9 years from now - /// - public static DateTime Years - { - get { return DateTime.UtcNow.AddYears(9); } - } - - /// - /// 9 years from the provided date - /// - public static DateTime YearsFrom(DateTime date) - { - return date.AddYears(9); - } - } - - /// - /// - public static class Ten - { - /// - /// 10 seconds from now - /// - public static DateTime Seconds - { - get { return DateTime.UtcNow.AddSeconds(10); } - } - - /// - /// 10 seconds from the provided date - /// - public static DateTime SecondsFrom(DateTime date) - { - return date.AddSeconds(10); - } - - /// - /// 10 minutes from now - /// - public static DateTime Minutes - { - get { return DateTime.UtcNow.AddMinutes(10); } - } - - /// - /// 10 minutes from the provided date - /// - public static DateTime MinutesFrom(DateTime date) - { - return date.AddMinutes(10); - } - - /// - /// 10 hours from now - /// - public static DateTime Hours - { - get { return DateTime.UtcNow.AddHours(10); } - } - - /// - /// 10 hours from the provided date - /// - public static DateTime HoursFrom(DateTime date) - { - return date.AddHours(10); - } - - /// - /// 10 days from now - /// - public static DateTime Days - { - get { return DateTime.UtcNow.AddDays(10); } - } - - /// - /// 10 days from the provided date - /// - public static DateTime DaysFrom(DateTime date) - { - return date.AddDays(10); - } - - /// - /// 10 weeks from now - /// - public static DateTime Weeks - { - get { return DateTime.UtcNow.AddDays(70); } - } - - /// - /// 10 weeks from the provided date - /// - public static DateTime WeeksFrom(DateTime date) - { - return date.AddDays(70); - } - - /// - /// 10 months from now - /// - public static DateTime Months - { - get { return DateTime.UtcNow.AddMonths(10); } - } - - /// - /// 10 months from the provided date - /// - public static DateTime MonthsFrom(DateTime date) - { - return date.AddMonths(10); - } - - /// - /// 10 years from now - /// - public static DateTime Years - { - get { return DateTime.UtcNow.AddYears(10); } - } - - /// - /// 10 years from the provided date - /// - public static DateTime YearsFrom(DateTime date) - { - return date.AddYears(10); - } - } - } + /// + /// 10 seconds from now + /// + public static DateTime Seconds + => DateTime.UtcNow.AddSeconds(10); + + /// + /// 10 seconds from the provided date + /// + public static DateTime SecondsFrom(DateTime date) + => date.AddSeconds(10); + + /// + /// 10 minutes from now + /// + public static DateTime Minutes + => DateTime.UtcNow.AddMinutes(10); + + /// + /// 10 minutes from the provided date + /// + public static DateTime MinutesFrom(DateTime date) + => date.AddMinutes(10); + + /// + /// 10 hours from now + /// + public static DateTime Hours + => DateTime.UtcNow.AddHours(10); + + /// + /// 10 hours from the provided date + /// + public static DateTime HoursFrom(DateTime date) + => date.AddHours(10); + + /// + /// 10 days from now + /// + public static DateTime Days + => DateTime.UtcNow.AddDays(10); + + /// + /// 10 days from the provided date + /// + public static DateTime DaysFrom(DateTime date) + => date.AddDays(10); + + /// + /// 10 weeks from now + /// + public static DateTime Weeks + => DateTime.UtcNow.AddDays(70); + + /// + /// 10 weeks from the provided date + /// + public static DateTime WeeksFrom(DateTime date) + => date.AddDays(70); + + /// + /// 10 months from now + /// + public static DateTime Months + => DateTime.UtcNow.AddMonths(10); + + /// + /// 10 months from the provided date + /// + public static DateTime MonthsFrom(DateTime date) + => date.AddMonths(10); + + /// + /// 10 years from now + /// + public static DateTime Years + => DateTime.UtcNow.AddYears(10); + + /// + /// 10 years from the provided date + /// + public static DateTime YearsFrom(DateTime date) + => date.AddYears(10); + } + } \ No newline at end of file diff --git a/src/Humanizer/FluentDate/In.SomeTimeFrom.tt b/src/Humanizer/FluentDate/In.SomeTimeFrom.tt index dcc7305eb..a19d6ad70 100644 --- a/src/Humanizer/FluentDate/In.SomeTimeFrom.tt +++ b/src/Humanizer/FluentDate/In.SomeTimeFrom.tt @@ -10,141 +10,113 @@ <#@ import namespace="System.Diagnostics" #> <#@ import namespace="System.Linq" #> <#@ import namespace="System.Collections" #> -<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Collections.Generic" #> using System; -namespace Humanizer +namespace Humanizer; + +/// +/// +public partial class In { +<#for (int i = 1; i <= 10; i++){ + var plural = ( i > 1 ? "s" : ""); + var second = "Second" + plural; + var minute = "Minute" + plural; + var hour = "Hour" + plural; + var day = "Day" + plural; + var week = "Week" + plural; + var month = "Month" + plural; + var year = "Year" + plural; +#> /// /// - public partial class In + public static class <#= i.ToWords().Dehumanize() #> { - <#for (int i = 1; i <= 10; i++){ - var plural = ( i > 1 ? "s" : ""); - var second = "Second" + plural; - var minute = "Minute" + plural; - var hour = "Hour" + plural; - var day = "Day" + plural; - var week = "Week" + plural; - var month = "Month" + plural; - var year = "Year" + plural; - #> /// + /// <#= i #> seconds from now + /// + public static DateTime <#= second #> + => DateTime.UtcNow.AddSeconds(<#= i #>); + + /// + /// <#= i #> seconds from the provided date /// - public static class <#= i.ToWords().Dehumanize() #> - { - /// - /// <#= i #> seconds from now - /// - public static DateTime <#= second #> - { - get { return DateTime.UtcNow.AddSeconds(<#= i #>); } - } - - /// - /// <#= i #> seconds from the provided date - /// - public static DateTime <#= second #>From(DateTime date) - { - return date.AddSeconds(<#= i #>); - } - - /// - /// <#= i #> minutes from now - /// - public static DateTime <#= minute #> - { - get { return DateTime.UtcNow.AddMinutes(<#= i #>); } - } - - /// - /// <#= i #> minutes from the provided date - /// - public static DateTime <#= minute #>From(DateTime date) - { - return date.AddMinutes(<#= i #>); - } - - /// - /// <#= i #> hours from now - /// - public static DateTime <#= hour #> - { - get { return DateTime.UtcNow.AddHours(<#= i #>); } - } - - /// - /// <#= i #> hours from the provided date - /// - public static DateTime <#= hour #>From(DateTime date) - { - return date.AddHours(<#= i #>); - } - - /// - /// <#= i #> days from now - /// - public static DateTime <#= day #> - { - get { return DateTime.UtcNow.AddDays(<#= i #>); } - } - - /// - /// <#= i #> days from the provided date - /// - public static DateTime <#= day #>From(DateTime date) - { - return date.AddDays(<#= i #>); - } - - /// - /// <#= i #> weeks from now - /// - public static DateTime <#= week #> - { - get { return DateTime.UtcNow.AddDays(<#= i * 7 #>); } - } - - /// - /// <#= i #> weeks from the provided date - /// - public static DateTime <#= week #>From(DateTime date) - { - return date.AddDays(<#= i * 7 #>); - } - - /// - /// <#= i #> months from now - /// - public static DateTime <#= month #> - { - get { return DateTime.UtcNow.AddMonths(<#= i #>); } - } - - /// - /// <#= i #> months from the provided date - /// - public static DateTime <#= month #>From(DateTime date) - { - return date.AddMonths(<#= i #>); - } - - /// - /// <#= i #> years from now - /// - public static DateTime <#= year #> - { - get { return DateTime.UtcNow.AddYears(<#= i #>); } - } - - /// - /// <#= i #> years from the provided date - /// - public static DateTime <#= year #>From(DateTime date) - { - return date.AddYears(<#= i #>); - } - } - <#}#> - } + public static DateTime <#= second #>From(DateTime date) + => date.AddSeconds(<#= i #>); + + /// + /// <#= i #> minutes from now + /// + public static DateTime <#= minute #> + => DateTime.UtcNow.AddMinutes(<#= i #>); + + /// + /// <#= i #> minutes from the provided date + /// + public static DateTime <#= minute #>From(DateTime date) + => date.AddMinutes(<#= i #>); + + /// + /// <#= i #> hours from now + /// + public static DateTime <#= hour #> + => DateTime.UtcNow.AddHours(<#= i #>); + + /// + /// <#= i #> hours from the provided date + /// + public static DateTime <#= hour #>From(DateTime date) + => date.AddHours(<#= i #>); + + /// + /// <#= i #> days from now + /// + public static DateTime <#= day #> + => DateTime.UtcNow.AddDays(<#= i #>); + + /// + /// <#= i #> days from the provided date + /// + public static DateTime <#= day #>From(DateTime date) + => date.AddDays(<#= i #>); + + /// + /// <#= i #> weeks from now + /// + public static DateTime <#= week #> + => DateTime.UtcNow.AddDays(<#= i * 7 #>); + + /// + /// <#= i #> weeks from the provided date + /// + public static DateTime <#= week #>From(DateTime date) + => date.AddDays(<#= i * 7 #>); + + /// + /// <#= i #> months from now + /// + public static DateTime <#= month #> + => DateTime.UtcNow.AddMonths(<#= i #>); + + /// + /// <#= i #> months from the provided date + /// + public static DateTime <#= month #>From(DateTime date) + => date.AddMonths(<#= i #>); + + /// + /// <#= i #> years from now + /// + public static DateTime <#= year #> + => DateTime.UtcNow.AddYears(<#= i #>); + + /// + /// <#= i #> years from the provided date + /// + public static DateTime <#= year #>From(DateTime date) + => date.AddYears(<#= i #>); + } + +<#}#> } \ No newline at end of file diff --git a/src/Humanizer/FluentDate/InDate.Months.cs b/src/Humanizer/FluentDate/InDate.Months.cs index b245b240a..59b5d653a 100644 --- a/src/Humanizer/FluentDate/InDate.Months.cs +++ b/src/Humanizer/FluentDate/InDate.Months.cs @@ -3,202 +3,153 @@ using System; -namespace Humanizer +namespace Humanizer; + +public partial class InDate { - public partial class InDate - { - - /// - /// Returns 1st of January of the current year - /// - public static DateOnly January - { - get { return new DateOnly(DateTime.UtcNow.Year, 1, 1); } - } - - /// - /// Returns 1st of January of the year passed in - /// - public static DateOnly JanuaryOf(int year) - { - return new DateOnly(year, 1, 1); - } - - /// - /// Returns 1st of February of the current year - /// - public static DateOnly February - { - get { return new DateOnly(DateTime.UtcNow.Year, 2, 1); } - } - - /// - /// Returns 1st of February of the year passed in - /// - public static DateOnly FebruaryOf(int year) - { - return new DateOnly(year, 2, 1); - } - - /// - /// Returns 1st of March of the current year - /// - public static DateOnly March - { - get { return new DateOnly(DateTime.UtcNow.Year, 3, 1); } - } - - /// - /// Returns 1st of March of the year passed in - /// - public static DateOnly MarchOf(int year) - { - return new DateOnly(year, 3, 1); - } - - /// - /// Returns 1st of April of the current year - /// - public static DateOnly April - { - get { return new DateOnly(DateTime.UtcNow.Year, 4, 1); } - } - - /// - /// Returns 1st of April of the year passed in - /// - public static DateOnly AprilOf(int year) - { - return new DateOnly(year, 4, 1); - } - - /// - /// Returns 1st of May of the current year - /// - public static DateOnly May - { - get { return new DateOnly(DateTime.UtcNow.Year, 5, 1); } - } - - /// - /// Returns 1st of May of the year passed in - /// - public static DateOnly MayOf(int year) - { - return new DateOnly(year, 5, 1); - } - - /// - /// Returns 1st of June of the current year - /// - public static DateOnly June - { - get { return new DateOnly(DateTime.UtcNow.Year, 6, 1); } - } - - /// - /// Returns 1st of June of the year passed in - /// - public static DateOnly JuneOf(int year) - { - return new DateOnly(year, 6, 1); - } - - /// - /// Returns 1st of July of the current year - /// - public static DateOnly July - { - get { return new DateOnly(DateTime.UtcNow.Year, 7, 1); } - } - - /// - /// Returns 1st of July of the year passed in - /// - public static DateOnly JulyOf(int year) - { - return new DateOnly(year, 7, 1); - } - - /// - /// Returns 1st of August of the current year - /// - public static DateOnly August - { - get { return new DateOnly(DateTime.UtcNow.Year, 8, 1); } - } - - /// - /// Returns 1st of August of the year passed in - /// - public static DateOnly AugustOf(int year) - { - return new DateOnly(year, 8, 1); - } - - /// - /// Returns 1st of September of the current year - /// - public static DateOnly September - { - get { return new DateOnly(DateTime.UtcNow.Year, 9, 1); } - } - - /// - /// Returns 1st of September of the year passed in - /// - public static DateOnly SeptemberOf(int year) - { - return new DateOnly(year, 9, 1); - } - - /// - /// Returns 1st of October of the current year - /// - public static DateOnly October - { - get { return new DateOnly(DateTime.UtcNow.Year, 10, 1); } - } - - /// - /// Returns 1st of October of the year passed in - /// - public static DateOnly OctoberOf(int year) - { - return new DateOnly(year, 10, 1); - } - - /// - /// Returns 1st of November of the current year - /// - public static DateOnly November - { - get { return new DateOnly(DateTime.UtcNow.Year, 11, 1); } - } - - /// - /// Returns 1st of November of the year passed in - /// - public static DateOnly NovemberOf(int year) - { - return new DateOnly(year, 11, 1); - } - - /// - /// Returns 1st of December of the current year - /// - public static DateOnly December - { - get { return new DateOnly(DateTime.UtcNow.Year, 12, 1); } - } - - /// - /// Returns 1st of December of the year passed in - /// - public static DateOnly DecemberOf(int year) - { - return new DateOnly(year, 12, 1); - } - } + /// + /// Returns 1st of January of the current year + /// + public static DateOnly January + => new(DateTime.UtcNow.Year, 1, 1); + + /// + /// Returns 1st of January of the year passed in + /// + public static DateOnly JanuaryOf(int year) + => new(year, 1, 1); + + /// + /// Returns 1st of February of the current year + /// + public static DateOnly February + => new(DateTime.UtcNow.Year, 2, 1); + + /// + /// Returns 1st of February of the year passed in + /// + public static DateOnly FebruaryOf(int year) + => new(year, 2, 1); + + /// + /// Returns 1st of March of the current year + /// + public static DateOnly March + => new(DateTime.UtcNow.Year, 3, 1); + + /// + /// Returns 1st of March of the year passed in + /// + public static DateOnly MarchOf(int year) + => new(year, 3, 1); + + /// + /// Returns 1st of April of the current year + /// + public static DateOnly April + => new(DateTime.UtcNow.Year, 4, 1); + + /// + /// Returns 1st of April of the year passed in + /// + public static DateOnly AprilOf(int year) + => new(year, 4, 1); + + /// + /// Returns 1st of May of the current year + /// + public static DateOnly May + => new(DateTime.UtcNow.Year, 5, 1); + + /// + /// Returns 1st of May of the year passed in + /// + public static DateOnly MayOf(int year) + => new(year, 5, 1); + + /// + /// Returns 1st of June of the current year + /// + public static DateOnly June + => new(DateTime.UtcNow.Year, 6, 1); + + /// + /// Returns 1st of June of the year passed in + /// + public static DateOnly JuneOf(int year) + => new(year, 6, 1); + + /// + /// Returns 1st of July of the current year + /// + public static DateOnly July + => new(DateTime.UtcNow.Year, 7, 1); + + /// + /// Returns 1st of July of the year passed in + /// + public static DateOnly JulyOf(int year) + => new(year, 7, 1); + + /// + /// Returns 1st of August of the current year + /// + public static DateOnly August + => new(DateTime.UtcNow.Year, 8, 1); + + /// + /// Returns 1st of August of the year passed in + /// + public static DateOnly AugustOf(int year) + => new(year, 8, 1); + + /// + /// Returns 1st of September of the current year + /// + public static DateOnly September + => new(DateTime.UtcNow.Year, 9, 1); + + /// + /// Returns 1st of September of the year passed in + /// + public static DateOnly SeptemberOf(int year) + => new(year, 9, 1); + + /// + /// Returns 1st of October of the current year + /// + public static DateOnly October + => new(DateTime.UtcNow.Year, 10, 1); + + /// + /// Returns 1st of October of the year passed in + /// + public static DateOnly OctoberOf(int year) + => new(year, 10, 1); + + /// + /// Returns 1st of November of the current year + /// + public static DateOnly November + => new(DateTime.UtcNow.Year, 11, 1); + + /// + /// Returns 1st of November of the year passed in + /// + public static DateOnly NovemberOf(int year) + => new(year, 11, 1); + + /// + /// Returns 1st of December of the current year + /// + public static DateOnly December + => new(DateTime.UtcNow.Year, 12, 1); + + /// + /// Returns 1st of December of the year passed in + /// + public static DateOnly DecemberOf(int year) + => new(year, 12, 1); + } #endif \ No newline at end of file diff --git a/src/Humanizer/FluentDate/InDate.Months.tt b/src/Humanizer/FluentDate/InDate.Months.tt index 95365a7ca..6aad01a4a 100644 --- a/src/Humanizer/FluentDate/InDate.Months.tt +++ b/src/Humanizer/FluentDate/InDate.Months.tt @@ -12,33 +12,29 @@ using System; -namespace Humanizer +namespace Humanizer; + +public partial class InDate { - public partial class InDate - { - <#var now = DateTime.Now; - for (int i = 0; i < 12; i++){ - var monthName = new DateTime(now.Year, i + 1, 1).ToString("MMMM"); - #> - /// - /// Returns 1st of <#= monthName #> of the current year - /// - public static DateOnly <#= monthName #> - { - get { return new DateOnly(DateTime.UtcNow.Year, <#= i + 1 #>, 1); } - } +<#var now = DateTime.Now; +for (int i = 0; i < 12; i++){ + var monthName = new DateTime(now.Year, i + 1, 1).ToString("MMMM"); +#> + /// + /// Returns 1st of <#= monthName #> of the current year + /// + public static DateOnly <#= monthName #> + => new(DateTime.UtcNow.Year, <#= i + 1 #>, 1); + + /// + /// Returns 1st of <#= monthName #> of the year passed in + /// + public static DateOnly <#= monthName#>Of(int year) + => new(year, <#= i + 1 #>, 1); - /// - /// Returns 1st of <#= monthName #> of the year passed in - /// - public static DateOnly <#= monthName#>Of(int year) - { - return new DateOnly(year, <#= i + 1 #>, 1); - } - <# - } +<# +} - #> - } +#> } #endif \ No newline at end of file diff --git a/src/Humanizer/FluentDate/InDate.SomeTimeFrom.cs b/src/Humanizer/FluentDate/InDate.SomeTimeFrom.cs index 9a7a0fce3..41388cfda 100644 --- a/src/Humanizer/FluentDate/InDate.SomeTimeFrom.cs +++ b/src/Humanizer/FluentDate/InDate.SomeTimeFrom.cs @@ -1,1024 +1,782 @@ - -#if NET6_0_OR_GREATER +#if NET6_0_OR_GREATER using System; -namespace Humanizer +namespace Humanizer; + +/// +/// +public partial class InDate { /// /// - public partial class InDate + public static class One + { + /// + /// 1 days from now + /// + public static DateOnly Day + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(1)); + + /// + /// 1 days from the provided date + /// + public static DateOnly DayFrom(DateOnly date) + => date.AddDays(1); + + /// + /// 1 days from the provided date + /// + public static DateOnly DayFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(1)); + + /// + /// 1 weeks from now + /// + public static DateOnly Week + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(7)); + + /// + /// 1 weeks from the provided date + /// + public static DateOnly WeekFrom(DateOnly date) + => date.AddDays(7); + + /// + /// 1 weeks from the provided date + /// + public static DateOnly WeekFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(7)); + + /// + /// 1 months from now + /// + public static DateOnly Month + => DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(1)); + + /// + /// 1 months from the provided date + /// + public static DateOnly MonthFrom(DateOnly date) + => date.AddMonths(1); + + /// + /// 1 months from the provided date + /// + public static DateOnly MonthFrom(DateTime date) + => DateOnly.FromDateTime(date.AddMonths(1)); + + /// + /// 1 years from now + /// + public static DateOnly Year + => DateOnly.FromDateTime(DateTime.UtcNow.AddYears(1)); + + /// + /// 1 years from the provided date + /// + public static DateOnly YearFrom(DateOnly date) + => date.AddYears(1); + + /// + /// 1 years from the provided date + /// + public static DateOnly YearFrom(DateTime date) + => DateOnly.FromDateTime(date.AddYears(1)); + } + + /// + /// + public static class Two + { + /// + /// 2 days from now + /// + public static DateOnly Days + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(2)); + + /// + /// 2 days from the provided date + /// + public static DateOnly DaysFrom(DateOnly date) + => date.AddDays(2); + + /// + /// 2 days from the provided date + /// + public static DateOnly DaysFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(2)); + + /// + /// 2 weeks from now + /// + public static DateOnly Weeks + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(14)); + + /// + /// 2 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateOnly date) + => date.AddDays(14); + + /// + /// 2 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(14)); + + /// + /// 2 months from now + /// + public static DateOnly Months + => DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(2)); + + /// + /// 2 months from the provided date + /// + public static DateOnly MonthsFrom(DateOnly date) + => date.AddMonths(2); + + /// + /// 2 months from the provided date + /// + public static DateOnly MonthsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddMonths(2)); + + /// + /// 2 years from now + /// + public static DateOnly Years + => DateOnly.FromDateTime(DateTime.UtcNow.AddYears(2)); + + /// + /// 2 years from the provided date + /// + public static DateOnly YearsFrom(DateOnly date) + => date.AddYears(2); + + /// + /// 2 years from the provided date + /// + public static DateOnly YearsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddYears(2)); + } + + /// + /// + public static class Three + { + /// + /// 3 days from now + /// + public static DateOnly Days + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(3)); + + /// + /// 3 days from the provided date + /// + public static DateOnly DaysFrom(DateOnly date) + => date.AddDays(3); + + /// + /// 3 days from the provided date + /// + public static DateOnly DaysFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(3)); + + /// + /// 3 weeks from now + /// + public static DateOnly Weeks + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(21)); + + /// + /// 3 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateOnly date) + => date.AddDays(21); + + /// + /// 3 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(21)); + + /// + /// 3 months from now + /// + public static DateOnly Months + => DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(3)); + + /// + /// 3 months from the provided date + /// + public static DateOnly MonthsFrom(DateOnly date) + => date.AddMonths(3); + + /// + /// 3 months from the provided date + /// + public static DateOnly MonthsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddMonths(3)); + + /// + /// 3 years from now + /// + public static DateOnly Years + => DateOnly.FromDateTime(DateTime.UtcNow.AddYears(3)); + + /// + /// 3 years from the provided date + /// + public static DateOnly YearsFrom(DateOnly date) + => date.AddYears(3); + + /// + /// 3 years from the provided date + /// + public static DateOnly YearsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddYears(3)); + } + + /// + /// + public static class Four + { + /// + /// 4 days from now + /// + public static DateOnly Days + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(4)); + + /// + /// 4 days from the provided date + /// + public static DateOnly DaysFrom(DateOnly date) + => date.AddDays(4); + + /// + /// 4 days from the provided date + /// + public static DateOnly DaysFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(4)); + + /// + /// 4 weeks from now + /// + public static DateOnly Weeks + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(28)); + + /// + /// 4 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateOnly date) + => date.AddDays(28); + + /// + /// 4 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(28)); + + /// + /// 4 months from now + /// + public static DateOnly Months + => DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(4)); + + /// + /// 4 months from the provided date + /// + public static DateOnly MonthsFrom(DateOnly date) + => date.AddMonths(4); + + /// + /// 4 months from the provided date + /// + public static DateOnly MonthsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddMonths(4)); + + /// + /// 4 years from now + /// + public static DateOnly Years + => DateOnly.FromDateTime(DateTime.UtcNow.AddYears(4)); + + /// + /// 4 years from the provided date + /// + public static DateOnly YearsFrom(DateOnly date) + => date.AddYears(4); + + /// + /// 4 years from the provided date + /// + public static DateOnly YearsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddYears(4)); + } + + /// + /// + public static class Five + { + /// + /// 5 days from now + /// + public static DateOnly Days + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(5)); + + /// + /// 5 days from the provided date + /// + public static DateOnly DaysFrom(DateOnly date) + => date.AddDays(5); + + /// + /// 5 days from the provided date + /// + public static DateOnly DaysFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(5)); + + /// + /// 5 weeks from now + /// + public static DateOnly Weeks + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(35)); + + /// + /// 5 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateOnly date) + => date.AddDays(35); + + /// + /// 5 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(35)); + + /// + /// 5 months from now + /// + public static DateOnly Months + => DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(5)); + + /// + /// 5 months from the provided date + /// + public static DateOnly MonthsFrom(DateOnly date) + => date.AddMonths(5); + + /// + /// 5 months from the provided date + /// + public static DateOnly MonthsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddMonths(5)); + + /// + /// 5 years from now + /// + public static DateOnly Years + => DateOnly.FromDateTime(DateTime.UtcNow.AddYears(5)); + + /// + /// 5 years from the provided date + /// + public static DateOnly YearsFrom(DateOnly date) + => date.AddYears(5); + + /// + /// 5 years from the provided date + /// + public static DateOnly YearsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddYears(5)); + } + + /// + /// + public static class Six + { + /// + /// 6 days from now + /// + public static DateOnly Days + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(6)); + + /// + /// 6 days from the provided date + /// + public static DateOnly DaysFrom(DateOnly date) + => date.AddDays(6); + + /// + /// 6 days from the provided date + /// + public static DateOnly DaysFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(6)); + + /// + /// 6 weeks from now + /// + public static DateOnly Weeks + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(42)); + + /// + /// 6 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateOnly date) + => date.AddDays(42); + + /// + /// 6 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(42)); + + /// + /// 6 months from now + /// + public static DateOnly Months + => DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(6)); + + /// + /// 6 months from the provided date + /// + public static DateOnly MonthsFrom(DateOnly date) + => date.AddMonths(6); + + /// + /// 6 months from the provided date + /// + public static DateOnly MonthsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddMonths(6)); + + /// + /// 6 years from now + /// + public static DateOnly Years + => DateOnly.FromDateTime(DateTime.UtcNow.AddYears(6)); + + /// + /// 6 years from the provided date + /// + public static DateOnly YearsFrom(DateOnly date) + => date.AddYears(6); + + /// + /// 6 years from the provided date + /// + public static DateOnly YearsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddYears(6)); + } + + /// + /// + public static class Seven + { + /// + /// 7 days from now + /// + public static DateOnly Days + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(7)); + + /// + /// 7 days from the provided date + /// + public static DateOnly DaysFrom(DateOnly date) + => date.AddDays(7); + + /// + /// 7 days from the provided date + /// + public static DateOnly DaysFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(7)); + + /// + /// 7 weeks from now + /// + public static DateOnly Weeks + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(49)); + + /// + /// 7 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateOnly date) + => date.AddDays(49); + + /// + /// 7 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(49)); + + /// + /// 7 months from now + /// + public static DateOnly Months + => DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(7)); + + /// + /// 7 months from the provided date + /// + public static DateOnly MonthsFrom(DateOnly date) + => date.AddMonths(7); + + /// + /// 7 months from the provided date + /// + public static DateOnly MonthsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddMonths(7)); + + /// + /// 7 years from now + /// + public static DateOnly Years + => DateOnly.FromDateTime(DateTime.UtcNow.AddYears(7)); + + /// + /// 7 years from the provided date + /// + public static DateOnly YearsFrom(DateOnly date) + => date.AddYears(7); + + /// + /// 7 years from the provided date + /// + public static DateOnly YearsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddYears(7)); + } + + /// + /// + public static class Eight + { + /// + /// 8 days from now + /// + public static DateOnly Days + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(8)); + + /// + /// 8 days from the provided date + /// + public static DateOnly DaysFrom(DateOnly date) + => date.AddDays(8); + + /// + /// 8 days from the provided date + /// + public static DateOnly DaysFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(8)); + + /// + /// 8 weeks from now + /// + public static DateOnly Weeks + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(56)); + + /// + /// 8 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateOnly date) + => date.AddDays(56); + + /// + /// 8 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(56)); + + /// + /// 8 months from now + /// + public static DateOnly Months + => DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(8)); + + /// + /// 8 months from the provided date + /// + public static DateOnly MonthsFrom(DateOnly date) + => date.AddMonths(8); + + /// + /// 8 months from the provided date + /// + public static DateOnly MonthsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddMonths(8)); + + /// + /// 8 years from now + /// + public static DateOnly Years + => DateOnly.FromDateTime(DateTime.UtcNow.AddYears(8)); + + /// + /// 8 years from the provided date + /// + public static DateOnly YearsFrom(DateOnly date) + => date.AddYears(8); + + /// + /// 8 years from the provided date + /// + public static DateOnly YearsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddYears(8)); + } + + /// + /// + public static class Nine { - - /// - /// - public static class One - { - /// - /// 1 days from now - /// - public static DateOnly Day - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(1)); } - } - - /// - /// 1 days from the provided date - /// - public static DateOnly DayFrom(DateOnly date) - { - return date.AddDays(1); - } - - /// - /// 1 days from the provided date - /// - public static DateOnly DayFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(1)); - } - - /// - /// 1 weeks from now - /// - public static DateOnly Week - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(7)); } - } - - /// - /// 1 weeks from the provided date - /// - public static DateOnly WeekFrom(DateOnly date) - { - return date.AddDays(7); - } - - /// - /// 1 weeks from the provided date - /// - public static DateOnly WeekFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(7)); - } - - /// - /// 1 months from now - /// - public static DateOnly Month - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(1)); } - } - - /// - /// 1 months from the provided date - /// - public static DateOnly MonthFrom(DateOnly date) - { - return date.AddMonths(1); - } - - /// - /// 1 months from the provided date - /// - public static DateOnly MonthFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddMonths(1)); - } - - /// - /// 1 years from now - /// - public static DateOnly Year - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddYears(1)); } - } - - /// - /// 1 years from the provided date - /// - public static DateOnly YearFrom(DateOnly date) - { - return date.AddYears(1); - } - - /// - /// 1 years from the provided date - /// - public static DateOnly YearFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddYears(1)); - } - } - - /// - /// - public static class Two - { - /// - /// 2 days from now - /// - public static DateOnly Days - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(2)); } - } - - /// - /// 2 days from the provided date - /// - public static DateOnly DaysFrom(DateOnly date) - { - return date.AddDays(2); - } - - /// - /// 2 days from the provided date - /// - public static DateOnly DaysFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(2)); - } - - /// - /// 2 weeks from now - /// - public static DateOnly Weeks - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(14)); } - } - - /// - /// 2 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateOnly date) - { - return date.AddDays(14); - } - - /// - /// 2 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(14)); - } - - /// - /// 2 months from now - /// - public static DateOnly Months - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(2)); } - } - - /// - /// 2 months from the provided date - /// - public static DateOnly MonthsFrom(DateOnly date) - { - return date.AddMonths(2); - } - - /// - /// 2 months from the provided date - /// - public static DateOnly MonthsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddMonths(2)); - } - - /// - /// 2 years from now - /// - public static DateOnly Years - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddYears(2)); } - } - - /// - /// 2 years from the provided date - /// - public static DateOnly YearsFrom(DateOnly date) - { - return date.AddYears(2); - } - - /// - /// 2 years from the provided date - /// - public static DateOnly YearsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddYears(2)); - } - } - - /// - /// - public static class Three - { - /// - /// 3 days from now - /// - public static DateOnly Days - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(3)); } - } - - /// - /// 3 days from the provided date - /// - public static DateOnly DaysFrom(DateOnly date) - { - return date.AddDays(3); - } - - /// - /// 3 days from the provided date - /// - public static DateOnly DaysFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(3)); - } - - /// - /// 3 weeks from now - /// - public static DateOnly Weeks - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(21)); } - } - - /// - /// 3 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateOnly date) - { - return date.AddDays(21); - } - - /// - /// 3 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(21)); - } - - /// - /// 3 months from now - /// - public static DateOnly Months - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(3)); } - } - - /// - /// 3 months from the provided date - /// - public static DateOnly MonthsFrom(DateOnly date) - { - return date.AddMonths(3); - } - - /// - /// 3 months from the provided date - /// - public static DateOnly MonthsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddMonths(3)); - } - - /// - /// 3 years from now - /// - public static DateOnly Years - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddYears(3)); } - } - - /// - /// 3 years from the provided date - /// - public static DateOnly YearsFrom(DateOnly date) - { - return date.AddYears(3); - } - - /// - /// 3 years from the provided date - /// - public static DateOnly YearsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddYears(3)); - } - } - - /// - /// - public static class Four - { - /// - /// 4 days from now - /// - public static DateOnly Days - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(4)); } - } - - /// - /// 4 days from the provided date - /// - public static DateOnly DaysFrom(DateOnly date) - { - return date.AddDays(4); - } - - /// - /// 4 days from the provided date - /// - public static DateOnly DaysFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(4)); - } - - /// - /// 4 weeks from now - /// - public static DateOnly Weeks - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(28)); } - } - - /// - /// 4 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateOnly date) - { - return date.AddDays(28); - } - - /// - /// 4 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(28)); - } - - /// - /// 4 months from now - /// - public static DateOnly Months - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(4)); } - } - - /// - /// 4 months from the provided date - /// - public static DateOnly MonthsFrom(DateOnly date) - { - return date.AddMonths(4); - } - - /// - /// 4 months from the provided date - /// - public static DateOnly MonthsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddMonths(4)); - } - - /// - /// 4 years from now - /// - public static DateOnly Years - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddYears(4)); } - } - - /// - /// 4 years from the provided date - /// - public static DateOnly YearsFrom(DateOnly date) - { - return date.AddYears(4); - } - - /// - /// 4 years from the provided date - /// - public static DateOnly YearsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddYears(4)); - } - } - - /// - /// - public static class Five - { - /// - /// 5 days from now - /// - public static DateOnly Days - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(5)); } - } - - /// - /// 5 days from the provided date - /// - public static DateOnly DaysFrom(DateOnly date) - { - return date.AddDays(5); - } - - /// - /// 5 days from the provided date - /// - public static DateOnly DaysFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(5)); - } - - /// - /// 5 weeks from now - /// - public static DateOnly Weeks - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(35)); } - } - - /// - /// 5 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateOnly date) - { - return date.AddDays(35); - } - - /// - /// 5 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(35)); - } - - /// - /// 5 months from now - /// - public static DateOnly Months - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(5)); } - } - - /// - /// 5 months from the provided date - /// - public static DateOnly MonthsFrom(DateOnly date) - { - return date.AddMonths(5); - } - - /// - /// 5 months from the provided date - /// - public static DateOnly MonthsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddMonths(5)); - } - - /// - /// 5 years from now - /// - public static DateOnly Years - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddYears(5)); } - } - - /// - /// 5 years from the provided date - /// - public static DateOnly YearsFrom(DateOnly date) - { - return date.AddYears(5); - } - - /// - /// 5 years from the provided date - /// - public static DateOnly YearsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddYears(5)); - } - } - - /// - /// - public static class Six - { - /// - /// 6 days from now - /// - public static DateOnly Days - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(6)); } - } - - /// - /// 6 days from the provided date - /// - public static DateOnly DaysFrom(DateOnly date) - { - return date.AddDays(6); - } - - /// - /// 6 days from the provided date - /// - public static DateOnly DaysFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(6)); - } - - /// - /// 6 weeks from now - /// - public static DateOnly Weeks - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(42)); } - } - - /// - /// 6 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateOnly date) - { - return date.AddDays(42); - } - - /// - /// 6 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(42)); - } - - /// - /// 6 months from now - /// - public static DateOnly Months - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(6)); } - } - - /// - /// 6 months from the provided date - /// - public static DateOnly MonthsFrom(DateOnly date) - { - return date.AddMonths(6); - } - - /// - /// 6 months from the provided date - /// - public static DateOnly MonthsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddMonths(6)); - } - - /// - /// 6 years from now - /// - public static DateOnly Years - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddYears(6)); } - } - - /// - /// 6 years from the provided date - /// - public static DateOnly YearsFrom(DateOnly date) - { - return date.AddYears(6); - } - - /// - /// 6 years from the provided date - /// - public static DateOnly YearsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddYears(6)); - } - } - - /// - /// - public static class Seven - { - /// - /// 7 days from now - /// - public static DateOnly Days - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(7)); } - } - - /// - /// 7 days from the provided date - /// - public static DateOnly DaysFrom(DateOnly date) - { - return date.AddDays(7); - } - - /// - /// 7 days from the provided date - /// - public static DateOnly DaysFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(7)); - } - - /// - /// 7 weeks from now - /// - public static DateOnly Weeks - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(49)); } - } - - /// - /// 7 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateOnly date) - { - return date.AddDays(49); - } - - /// - /// 7 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(49)); - } - - /// - /// 7 months from now - /// - public static DateOnly Months - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(7)); } - } - - /// - /// 7 months from the provided date - /// - public static DateOnly MonthsFrom(DateOnly date) - { - return date.AddMonths(7); - } - - /// - /// 7 months from the provided date - /// - public static DateOnly MonthsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddMonths(7)); - } - - /// - /// 7 years from now - /// - public static DateOnly Years - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddYears(7)); } - } - - /// - /// 7 years from the provided date - /// - public static DateOnly YearsFrom(DateOnly date) - { - return date.AddYears(7); - } - - /// - /// 7 years from the provided date - /// - public static DateOnly YearsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddYears(7)); - } - } - - /// - /// - public static class Eight - { - /// - /// 8 days from now - /// - public static DateOnly Days - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(8)); } - } - - /// - /// 8 days from the provided date - /// - public static DateOnly DaysFrom(DateOnly date) - { - return date.AddDays(8); - } - - /// - /// 8 days from the provided date - /// - public static DateOnly DaysFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(8)); - } - - /// - /// 8 weeks from now - /// - public static DateOnly Weeks - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(56)); } - } - - /// - /// 8 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateOnly date) - { - return date.AddDays(56); - } - - /// - /// 8 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(56)); - } - - /// - /// 8 months from now - /// - public static DateOnly Months - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(8)); } - } - - /// - /// 8 months from the provided date - /// - public static DateOnly MonthsFrom(DateOnly date) - { - return date.AddMonths(8); - } - - /// - /// 8 months from the provided date - /// - public static DateOnly MonthsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddMonths(8)); - } - - /// - /// 8 years from now - /// - public static DateOnly Years - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddYears(8)); } - } - - /// - /// 8 years from the provided date - /// - public static DateOnly YearsFrom(DateOnly date) - { - return date.AddYears(8); - } - - /// - /// 8 years from the provided date - /// - public static DateOnly YearsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddYears(8)); - } - } - - /// - /// - public static class Nine - { - /// - /// 9 days from now - /// - public static DateOnly Days - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(9)); } - } - - /// - /// 9 days from the provided date - /// - public static DateOnly DaysFrom(DateOnly date) - { - return date.AddDays(9); - } - - /// - /// 9 days from the provided date - /// - public static DateOnly DaysFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(9)); - } - - /// - /// 9 weeks from now - /// - public static DateOnly Weeks - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(63)); } - } - - /// - /// 9 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateOnly date) - { - return date.AddDays(63); - } - - /// - /// 9 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(63)); - } - - /// - /// 9 months from now - /// - public static DateOnly Months - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(9)); } - } - - /// - /// 9 months from the provided date - /// - public static DateOnly MonthsFrom(DateOnly date) - { - return date.AddMonths(9); - } - - /// - /// 9 months from the provided date - /// - public static DateOnly MonthsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddMonths(9)); - } - - /// - /// 9 years from now - /// - public static DateOnly Years - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddYears(9)); } - } - - /// - /// 9 years from the provided date - /// - public static DateOnly YearsFrom(DateOnly date) - { - return date.AddYears(9); - } - - /// - /// 9 years from the provided date - /// - public static DateOnly YearsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddYears(9)); - } - } - - /// - /// - public static class Ten - { - /// - /// 10 days from now - /// - public static DateOnly Days - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(10)); } - } - - /// - /// 10 days from the provided date - /// - public static DateOnly DaysFrom(DateOnly date) - { - return date.AddDays(10); - } - - /// - /// 10 days from the provided date - /// - public static DateOnly DaysFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(10)); - } - - /// - /// 10 weeks from now - /// - public static DateOnly Weeks - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(70)); } - } - - /// - /// 10 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateOnly date) - { - return date.AddDays(70); - } - - /// - /// 10 weeks from the provided date - /// - public static DateOnly WeeksFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(70)); - } - - /// - /// 10 months from now - /// - public static DateOnly Months - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(10)); } - } - - /// - /// 10 months from the provided date - /// - public static DateOnly MonthsFrom(DateOnly date) - { - return date.AddMonths(10); - } - - /// - /// 10 months from the provided date - /// - public static DateOnly MonthsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddMonths(10)); - } - - /// - /// 10 years from now - /// - public static DateOnly Years - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddYears(10)); } - } - - /// - /// 10 years from the provided date - /// - public static DateOnly YearsFrom(DateOnly date) - { - return date.AddYears(10); - } - - /// - /// 10 years from the provided date - /// - public static DateOnly YearsFrom(DateTime date) - { - return DateOnly.FromDateTime(date.AddYears(10)); - } - } - } + /// + /// 9 days from now + /// + public static DateOnly Days + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(9)); + + /// + /// 9 days from the provided date + /// + public static DateOnly DaysFrom(DateOnly date) + => date.AddDays(9); + + /// + /// 9 days from the provided date + /// + public static DateOnly DaysFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(9)); + + /// + /// 9 weeks from now + /// + public static DateOnly Weeks + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(63)); + + /// + /// 9 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateOnly date) + => date.AddDays(63); + + /// + /// 9 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(63)); + + /// + /// 9 months from now + /// + public static DateOnly Months + => DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(9)); + + /// + /// 9 months from the provided date + /// + public static DateOnly MonthsFrom(DateOnly date) + => date.AddMonths(9); + + /// + /// 9 months from the provided date + /// + public static DateOnly MonthsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddMonths(9)); + + /// + /// 9 years from now + /// + public static DateOnly Years + => DateOnly.FromDateTime(DateTime.UtcNow.AddYears(9)); + + /// + /// 9 years from the provided date + /// + public static DateOnly YearsFrom(DateOnly date) + => date.AddYears(9); + + /// + /// 9 years from the provided date + /// + public static DateOnly YearsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddYears(9)); + } + + /// + /// + public static class Ten + { + /// + /// 10 days from now + /// + public static DateOnly Days + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(10)); + + /// + /// 10 days from the provided date + /// + public static DateOnly DaysFrom(DateOnly date) + => date.AddDays(10); + + /// + /// 10 days from the provided date + /// + public static DateOnly DaysFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(10)); + + /// + /// 10 weeks from now + /// + public static DateOnly Weeks + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(70)); + + /// + /// 10 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateOnly date) + => date.AddDays(70); + + /// + /// 10 weeks from the provided date + /// + public static DateOnly WeeksFrom(DateTime date) + => DateOnly.FromDateTime(date.AddDays(70)); + + /// + /// 10 months from now + /// + public static DateOnly Months + => DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(10)); + + /// + /// 10 months from the provided date + /// + public static DateOnly MonthsFrom(DateOnly date) + => date.AddMonths(10); + + /// + /// 10 months from the provided date + /// + public static DateOnly MonthsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddMonths(10)); + + /// + /// 10 years from now + /// + public static DateOnly Years + => DateOnly.FromDateTime(DateTime.UtcNow.AddYears(10)); + + /// + /// 10 years from the provided date + /// + public static DateOnly YearsFrom(DateOnly date) + => date.AddYears(10); + + /// + /// 10 years from the provided date + /// + public static DateOnly YearsFrom(DateTime date) + => DateOnly.FromDateTime(date.AddYears(10)); + } + } #endif \ No newline at end of file diff --git a/src/Humanizer/FluentDate/InDate.SomeTimeFrom.tt b/src/Humanizer/FluentDate/InDate.SomeTimeFrom.tt index 0c8096ff3..6967ed6bd 100644 --- a/src/Humanizer/FluentDate/InDate.SomeTimeFrom.tt +++ b/src/Humanizer/FluentDate/InDate.SomeTimeFrom.tt @@ -10,126 +10,102 @@ <#@ import namespace="System.Diagnostics" #> <#@ import namespace="System.Linq" #> <#@ import namespace="System.Collections" #> -<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Collections.Generic" #> #if NET6_0_OR_GREATER using System; -namespace Humanizer +namespace Humanizer; + +/// +/// +public partial class InDate { +<#for (int i = 1; i <= 10; i++){ + var plural = ( i > 1 ? "s" : ""); + + var day = "Day" + plural; + var week = "Week" + plural; + var month = "Month" + plural; + var year = "Year" + plural; +#> /// /// - public partial class InDate + public static class <#= i.ToWords().Dehumanize() #> { - <#for (int i = 1; i <= 10; i++){ - var plural = ( i > 1 ? "s" : ""); - - var day = "Day" + plural; - var week = "Week" + plural; - var month = "Month" + plural; - var year = "Year" + plural; - #> /// + /// <#= i #> days from now + /// + public static DateOnly <#= day #> + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(<#= i #>)); + + /// + /// <#= i #> days from the provided date + /// + public static DateOnly <#= day #>From(DateOnly date) + => date.AddDays(<#= i #>); + + /// + /// <#= i #> days from the provided date + /// + public static DateOnly <#= day #>From(DateTime date) + => DateOnly.FromDateTime(date.AddDays(<#= i #>)); + + /// + /// <#= i #> weeks from now + /// + public static DateOnly <#= week #> + => DateOnly.FromDateTime(DateTime.UtcNow.AddDays(<#= i * 7 #>)); + + /// + /// <#= i #> weeks from the provided date + /// + public static DateOnly <#= week #>From(DateOnly date) + => date.AddDays(<#= i * 7 #>); + + /// + /// <#= i #> weeks from the provided date + /// + public static DateOnly <#= week #>From(DateTime date) + => DateOnly.FromDateTime(date.AddDays(<#= i * 7 #>)); + + /// + /// <#= i #> months from now + /// + public static DateOnly <#= month #> + => DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(<#= i #>)); + + /// + /// <#= i #> months from the provided date + /// + public static DateOnly <#= month #>From(DateOnly date) + => date.AddMonths(<#= i #>); + + /// + /// <#= i #> months from the provided date + /// + public static DateOnly <#= month #>From(DateTime date) + => DateOnly.FromDateTime(date.AddMonths(<#= i #>)); + + /// + /// <#= i #> years from now + /// + public static DateOnly <#= year #> + => DateOnly.FromDateTime(DateTime.UtcNow.AddYears(<#= i #>)); + + /// + /// <#= i #> years from the provided date /// - public static class <#= i.ToWords().Dehumanize() #> - { - /// - /// <#= i #> days from now - /// - public static DateOnly <#= day #> - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(<#= i #>)); } - } - - /// - /// <#= i #> days from the provided date - /// - public static DateOnly <#= day #>From(DateOnly date) - { - return date.AddDays(<#= i #>); - } - - /// - /// <#= i #> days from the provided date - /// - public static DateOnly <#= day #>From(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(<#= i #>)); - } - - /// - /// <#= i #> weeks from now - /// - public static DateOnly <#= week #> - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddDays(<#= i * 7 #>)); } - } - - /// - /// <#= i #> weeks from the provided date - /// - public static DateOnly <#= week #>From(DateOnly date) - { - return date.AddDays(<#= i * 7 #>); - } - - /// - /// <#= i #> weeks from the provided date - /// - public static DateOnly <#= week #>From(DateTime date) - { - return DateOnly.FromDateTime(date.AddDays(<#= i * 7 #>)); - } - - /// - /// <#= i #> months from now - /// - public static DateOnly <#= month #> - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddMonths(<#= i #>)); } - } - - /// - /// <#= i #> months from the provided date - /// - public static DateOnly <#= month #>From(DateOnly date) - { - return date.AddMonths(<#= i #>); - } - - /// - /// <#= i #> months from the provided date - /// - public static DateOnly <#= month #>From(DateTime date) - { - return DateOnly.FromDateTime(date.AddMonths(<#= i #>)); - } - - /// - /// <#= i #> years from now - /// - public static DateOnly <#= year #> - { - get { return DateOnly.FromDateTime(DateTime.UtcNow.AddYears(<#= i #>)); } - } - - /// - /// <#= i #> years from the provided date - /// - public static DateOnly <#= year #>From(DateOnly date) - { - return date.AddYears(<#= i #>); - } - - /// - /// <#= i #> years from the provided date - /// - public static DateOnly <#= year #>From(DateTime date) - { - return DateOnly.FromDateTime(date.AddYears(<#= i #>)); - } - } - <#}#> - } + public static DateOnly <#= year #>From(DateOnly date) + => date.AddYears(<#= i #>); + + /// + /// <#= i #> years from the provided date + /// + public static DateOnly <#= year #>From(DateTime date) + => DateOnly.FromDateTime(date.AddYears(<#= i #>)); + } + +<#}#> } #endif \ No newline at end of file diff --git a/src/Humanizer/FluentDate/On.Days.cs b/src/Humanizer/FluentDate/On.Days.cs index fc784d6c0..903440621 100644 --- a/src/Humanizer/FluentDate/On.Days.cs +++ b/src/Humanizer/FluentDate/On.Days.cs @@ -1,3107 +1,2349 @@ - -using System; +using System; -namespace Humanizer +namespace Humanizer; + +/// +/// +public partial class On { /// + /// Provides fluent date accessors for January + /// + public class January + { + /// + /// The nth day of January of the current year + /// + public static DateTime The(int dayNumber) + => new(DateTime.Now.Year, 1, dayNumber); + + + /// + /// The 1st day of January of the current year + /// + public static DateTime The1st + => new(DateTime.Now.Year, 1, 1); + + /// + /// The 2nd day of January of the current year + /// + public static DateTime The2nd + => new(DateTime.Now.Year, 1, 2); + + /// + /// The 3rd day of January of the current year + /// + public static DateTime The3rd + => new(DateTime.Now.Year, 1, 3); + + /// + /// The 4th day of January of the current year + /// + public static DateTime The4th + => new(DateTime.Now.Year, 1, 4); + + /// + /// The 5th day of January of the current year + /// + public static DateTime The5th + => new(DateTime.Now.Year, 1, 5); + + /// + /// The 6th day of January of the current year + /// + public static DateTime The6th + => new(DateTime.Now.Year, 1, 6); + + /// + /// The 7th day of January of the current year + /// + public static DateTime The7th + => new(DateTime.Now.Year, 1, 7); + + /// + /// The 8th day of January of the current year + /// + public static DateTime The8th + => new(DateTime.Now.Year, 1, 8); + + /// + /// The 9th day of January of the current year + /// + public static DateTime The9th + => new(DateTime.Now.Year, 1, 9); + + /// + /// The 10th day of January of the current year + /// + public static DateTime The10th + => new(DateTime.Now.Year, 1, 10); + + /// + /// The 11th day of January of the current year + /// + public static DateTime The11th + => new(DateTime.Now.Year, 1, 11); + + /// + /// The 12th day of January of the current year + /// + public static DateTime The12th + => new(DateTime.Now.Year, 1, 12); + + /// + /// The 13th day of January of the current year + /// + public static DateTime The13th + => new(DateTime.Now.Year, 1, 13); + + /// + /// The 14th day of January of the current year + /// + public static DateTime The14th + => new(DateTime.Now.Year, 1, 14); + + /// + /// The 15th day of January of the current year + /// + public static DateTime The15th + => new(DateTime.Now.Year, 1, 15); + + /// + /// The 16th day of January of the current year + /// + public static DateTime The16th + => new(DateTime.Now.Year, 1, 16); + + /// + /// The 17th day of January of the current year + /// + public static DateTime The17th + => new(DateTime.Now.Year, 1, 17); + + /// + /// The 18th day of January of the current year + /// + public static DateTime The18th + => new(DateTime.Now.Year, 1, 18); + + /// + /// The 19th day of January of the current year + /// + public static DateTime The19th + => new(DateTime.Now.Year, 1, 19); + + /// + /// The 20th day of January of the current year + /// + public static DateTime The20th + => new(DateTime.Now.Year, 1, 20); + + /// + /// The 21st day of January of the current year + /// + public static DateTime The21st + => new(DateTime.Now.Year, 1, 21); + + /// + /// The 22nd day of January of the current year + /// + public static DateTime The22nd + => new(DateTime.Now.Year, 1, 22); + + /// + /// The 23rd day of January of the current year + /// + public static DateTime The23rd + => new(DateTime.Now.Year, 1, 23); + + /// + /// The 24th day of January of the current year + /// + public static DateTime The24th + => new(DateTime.Now.Year, 1, 24); + + /// + /// The 25th day of January of the current year + /// + public static DateTime The25th + => new(DateTime.Now.Year, 1, 25); + + /// + /// The 26th day of January of the current year + /// + public static DateTime The26th + => new(DateTime.Now.Year, 1, 26); + + /// + /// The 27th day of January of the current year + /// + public static DateTime The27th + => new(DateTime.Now.Year, 1, 27); + + /// + /// The 28th day of January of the current year + /// + public static DateTime The28th + => new(DateTime.Now.Year, 1, 28); + + /// + /// The 29th day of January of the current year + /// + public static DateTime The29th + => new(DateTime.Now.Year, 1, 29); + + /// + /// The 30th day of January of the current year + /// + public static DateTime The30th + => new(DateTime.Now.Year, 1, 30); + + /// + /// The 31st day of January of the current year + /// + public static DateTime The31st + => new(DateTime.Now.Year, 1, 31); + } + /// + /// Provides fluent date accessors for February + /// + public class February + { + /// + /// The nth day of February of the current year + /// + public static DateTime The(int dayNumber) + => new(DateTime.Now.Year, 2, dayNumber); + + + /// + /// The 1st day of February of the current year + /// + public static DateTime The1st + => new(DateTime.Now.Year, 2, 1); + + /// + /// The 2nd day of February of the current year + /// + public static DateTime The2nd + => new(DateTime.Now.Year, 2, 2); + + /// + /// The 3rd day of February of the current year + /// + public static DateTime The3rd + => new(DateTime.Now.Year, 2, 3); + + /// + /// The 4th day of February of the current year + /// + public static DateTime The4th + => new(DateTime.Now.Year, 2, 4); + + /// + /// The 5th day of February of the current year + /// + public static DateTime The5th + => new(DateTime.Now.Year, 2, 5); + + /// + /// The 6th day of February of the current year + /// + public static DateTime The6th + => new(DateTime.Now.Year, 2, 6); + + /// + /// The 7th day of February of the current year + /// + public static DateTime The7th + => new(DateTime.Now.Year, 2, 7); + + /// + /// The 8th day of February of the current year + /// + public static DateTime The8th + => new(DateTime.Now.Year, 2, 8); + + /// + /// The 9th day of February of the current year + /// + public static DateTime The9th + => new(DateTime.Now.Year, 2, 9); + + /// + /// The 10th day of February of the current year + /// + public static DateTime The10th + => new(DateTime.Now.Year, 2, 10); + + /// + /// The 11th day of February of the current year + /// + public static DateTime The11th + => new(DateTime.Now.Year, 2, 11); + + /// + /// The 12th day of February of the current year + /// + public static DateTime The12th + => new(DateTime.Now.Year, 2, 12); + + /// + /// The 13th day of February of the current year + /// + public static DateTime The13th + => new(DateTime.Now.Year, 2, 13); + + /// + /// The 14th day of February of the current year + /// + public static DateTime The14th + => new(DateTime.Now.Year, 2, 14); + + /// + /// The 15th day of February of the current year + /// + public static DateTime The15th + => new(DateTime.Now.Year, 2, 15); + + /// + /// The 16th day of February of the current year + /// + public static DateTime The16th + => new(DateTime.Now.Year, 2, 16); + + /// + /// The 17th day of February of the current year + /// + public static DateTime The17th + => new(DateTime.Now.Year, 2, 17); + + /// + /// The 18th day of February of the current year + /// + public static DateTime The18th + => new(DateTime.Now.Year, 2, 18); + + /// + /// The 19th day of February of the current year + /// + public static DateTime The19th + => new(DateTime.Now.Year, 2, 19); + + /// + /// The 20th day of February of the current year + /// + public static DateTime The20th + => new(DateTime.Now.Year, 2, 20); + + /// + /// The 21st day of February of the current year + /// + public static DateTime The21st + => new(DateTime.Now.Year, 2, 21); + + /// + /// The 22nd day of February of the current year + /// + public static DateTime The22nd + => new(DateTime.Now.Year, 2, 22); + + /// + /// The 23rd day of February of the current year + /// + public static DateTime The23rd + => new(DateTime.Now.Year, 2, 23); + + /// + /// The 24th day of February of the current year + /// + public static DateTime The24th + => new(DateTime.Now.Year, 2, 24); + + /// + /// The 25th day of February of the current year + /// + public static DateTime The25th + => new(DateTime.Now.Year, 2, 25); + + /// + /// The 26th day of February of the current year + /// + public static DateTime The26th + => new(DateTime.Now.Year, 2, 26); + + /// + /// The 27th day of February of the current year + /// + public static DateTime The27th + => new(DateTime.Now.Year, 2, 27); + + /// + /// The 28th day of February of the current year + /// + public static DateTime The28th + => new(DateTime.Now.Year, 2, 28); + + /// + /// The 29th day of February of the current year + /// + public static DateTime The29th + => new(DateTime.Now.Year, 2, 29); + } + /// + /// Provides fluent date accessors for March /// - public partial class On + public class March { - - /// - /// Provides fluent date accessors for January - /// - public class January - { - /// - /// The nth day of January of the current year - /// - public static DateTime The(int dayNumber) - { - return new DateTime(DateTime.Now.Year, 1, dayNumber); - } - - /// - /// The 1st day of January of the current year - /// - public static DateTime The1st - { - get { return new DateTime(DateTime.Now.Year, 1, 1); } - } - - /// - /// The 2nd day of January of the current year - /// - public static DateTime The2nd - { - get { return new DateTime(DateTime.Now.Year, 1, 2); } - } - - /// - /// The 3rd day of January of the current year - /// - public static DateTime The3rd - { - get { return new DateTime(DateTime.Now.Year, 1, 3); } - } - - /// - /// The 4th day of January of the current year - /// - public static DateTime The4th - { - get { return new DateTime(DateTime.Now.Year, 1, 4); } - } - - /// - /// The 5th day of January of the current year - /// - public static DateTime The5th - { - get { return new DateTime(DateTime.Now.Year, 1, 5); } - } - - /// - /// The 6th day of January of the current year - /// - public static DateTime The6th - { - get { return new DateTime(DateTime.Now.Year, 1, 6); } - } - - /// - /// The 7th day of January of the current year - /// - public static DateTime The7th - { - get { return new DateTime(DateTime.Now.Year, 1, 7); } - } - - /// - /// The 8th day of January of the current year - /// - public static DateTime The8th - { - get { return new DateTime(DateTime.Now.Year, 1, 8); } - } - - /// - /// The 9th day of January of the current year - /// - public static DateTime The9th - { - get { return new DateTime(DateTime.Now.Year, 1, 9); } - } - - /// - /// The 10th day of January of the current year - /// - public static DateTime The10th - { - get { return new DateTime(DateTime.Now.Year, 1, 10); } - } - - /// - /// The 11th day of January of the current year - /// - public static DateTime The11th - { - get { return new DateTime(DateTime.Now.Year, 1, 11); } - } - - /// - /// The 12th day of January of the current year - /// - public static DateTime The12th - { - get { return new DateTime(DateTime.Now.Year, 1, 12); } - } - - /// - /// The 13th day of January of the current year - /// - public static DateTime The13th - { - get { return new DateTime(DateTime.Now.Year, 1, 13); } - } - - /// - /// The 14th day of January of the current year - /// - public static DateTime The14th - { - get { return new DateTime(DateTime.Now.Year, 1, 14); } - } - - /// - /// The 15th day of January of the current year - /// - public static DateTime The15th - { - get { return new DateTime(DateTime.Now.Year, 1, 15); } - } - - /// - /// The 16th day of January of the current year - /// - public static DateTime The16th - { - get { return new DateTime(DateTime.Now.Year, 1, 16); } - } - - /// - /// The 17th day of January of the current year - /// - public static DateTime The17th - { - get { return new DateTime(DateTime.Now.Year, 1, 17); } - } - - /// - /// The 18th day of January of the current year - /// - public static DateTime The18th - { - get { return new DateTime(DateTime.Now.Year, 1, 18); } - } - - /// - /// The 19th day of January of the current year - /// - public static DateTime The19th - { - get { return new DateTime(DateTime.Now.Year, 1, 19); } - } - - /// - /// The 20th day of January of the current year - /// - public static DateTime The20th - { - get { return new DateTime(DateTime.Now.Year, 1, 20); } - } - - /// - /// The 21st day of January of the current year - /// - public static DateTime The21st - { - get { return new DateTime(DateTime.Now.Year, 1, 21); } - } - - /// - /// The 22nd day of January of the current year - /// - public static DateTime The22nd - { - get { return new DateTime(DateTime.Now.Year, 1, 22); } - } - - /// - /// The 23rd day of January of the current year - /// - public static DateTime The23rd - { - get { return new DateTime(DateTime.Now.Year, 1, 23); } - } - - /// - /// The 24th day of January of the current year - /// - public static DateTime The24th - { - get { return new DateTime(DateTime.Now.Year, 1, 24); } - } - - /// - /// The 25th day of January of the current year - /// - public static DateTime The25th - { - get { return new DateTime(DateTime.Now.Year, 1, 25); } - } - - /// - /// The 26th day of January of the current year - /// - public static DateTime The26th - { - get { return new DateTime(DateTime.Now.Year, 1, 26); } - } - - /// - /// The 27th day of January of the current year - /// - public static DateTime The27th - { - get { return new DateTime(DateTime.Now.Year, 1, 27); } - } - - /// - /// The 28th day of January of the current year - /// - public static DateTime The28th - { - get { return new DateTime(DateTime.Now.Year, 1, 28); } - } - - /// - /// The 29th day of January of the current year - /// - public static DateTime The29th - { - get { return new DateTime(DateTime.Now.Year, 1, 29); } - } - - /// - /// The 30th day of January of the current year - /// - public static DateTime The30th - { - get { return new DateTime(DateTime.Now.Year, 1, 30); } - } - - /// - /// The 31st day of January of the current year - /// - public static DateTime The31st - { - get { return new DateTime(DateTime.Now.Year, 1, 31); } - } - } - - /// - /// Provides fluent date accessors for February - /// - public class February - { - /// - /// The nth day of February of the current year - /// - public static DateTime The(int dayNumber) - { - return new DateTime(DateTime.Now.Year, 2, dayNumber); - } - - /// - /// The 1st day of February of the current year - /// - public static DateTime The1st - { - get { return new DateTime(DateTime.Now.Year, 2, 1); } - } - - /// - /// The 2nd day of February of the current year - /// - public static DateTime The2nd - { - get { return new DateTime(DateTime.Now.Year, 2, 2); } - } - - /// - /// The 3rd day of February of the current year - /// - public static DateTime The3rd - { - get { return new DateTime(DateTime.Now.Year, 2, 3); } - } - - /// - /// The 4th day of February of the current year - /// - public static DateTime The4th - { - get { return new DateTime(DateTime.Now.Year, 2, 4); } - } - - /// - /// The 5th day of February of the current year - /// - public static DateTime The5th - { - get { return new DateTime(DateTime.Now.Year, 2, 5); } - } - - /// - /// The 6th day of February of the current year - /// - public static DateTime The6th - { - get { return new DateTime(DateTime.Now.Year, 2, 6); } - } - - /// - /// The 7th day of February of the current year - /// - public static DateTime The7th - { - get { return new DateTime(DateTime.Now.Year, 2, 7); } - } - - /// - /// The 8th day of February of the current year - /// - public static DateTime The8th - { - get { return new DateTime(DateTime.Now.Year, 2, 8); } - } - - /// - /// The 9th day of February of the current year - /// - public static DateTime The9th - { - get { return new DateTime(DateTime.Now.Year, 2, 9); } - } - - /// - /// The 10th day of February of the current year - /// - public static DateTime The10th - { - get { return new DateTime(DateTime.Now.Year, 2, 10); } - } - - /// - /// The 11th day of February of the current year - /// - public static DateTime The11th - { - get { return new DateTime(DateTime.Now.Year, 2, 11); } - } - - /// - /// The 12th day of February of the current year - /// - public static DateTime The12th - { - get { return new DateTime(DateTime.Now.Year, 2, 12); } - } - - /// - /// The 13th day of February of the current year - /// - public static DateTime The13th - { - get { return new DateTime(DateTime.Now.Year, 2, 13); } - } - - /// - /// The 14th day of February of the current year - /// - public static DateTime The14th - { - get { return new DateTime(DateTime.Now.Year, 2, 14); } - } - - /// - /// The 15th day of February of the current year - /// - public static DateTime The15th - { - get { return new DateTime(DateTime.Now.Year, 2, 15); } - } - - /// - /// The 16th day of February of the current year - /// - public static DateTime The16th - { - get { return new DateTime(DateTime.Now.Year, 2, 16); } - } - - /// - /// The 17th day of February of the current year - /// - public static DateTime The17th - { - get { return new DateTime(DateTime.Now.Year, 2, 17); } - } - - /// - /// The 18th day of February of the current year - /// - public static DateTime The18th - { - get { return new DateTime(DateTime.Now.Year, 2, 18); } - } - - /// - /// The 19th day of February of the current year - /// - public static DateTime The19th - { - get { return new DateTime(DateTime.Now.Year, 2, 19); } - } - - /// - /// The 20th day of February of the current year - /// - public static DateTime The20th - { - get { return new DateTime(DateTime.Now.Year, 2, 20); } - } - - /// - /// The 21st day of February of the current year - /// - public static DateTime The21st - { - get { return new DateTime(DateTime.Now.Year, 2, 21); } - } - - /// - /// The 22nd day of February of the current year - /// - public static DateTime The22nd - { - get { return new DateTime(DateTime.Now.Year, 2, 22); } - } - - /// - /// The 23rd day of February of the current year - /// - public static DateTime The23rd - { - get { return new DateTime(DateTime.Now.Year, 2, 23); } - } - - /// - /// The 24th day of February of the current year - /// - public static DateTime The24th - { - get { return new DateTime(DateTime.Now.Year, 2, 24); } - } - - /// - /// The 25th day of February of the current year - /// - public static DateTime The25th - { - get { return new DateTime(DateTime.Now.Year, 2, 25); } - } - - /// - /// The 26th day of February of the current year - /// - public static DateTime The26th - { - get { return new DateTime(DateTime.Now.Year, 2, 26); } - } - - /// - /// The 27th day of February of the current year - /// - public static DateTime The27th - { - get { return new DateTime(DateTime.Now.Year, 2, 27); } - } - - /// - /// The 28th day of February of the current year - /// - public static DateTime The28th - { - get { return new DateTime(DateTime.Now.Year, 2, 28); } - } - - /// - /// The 29th day of February of the current year - /// - public static DateTime The29th - { - get { return new DateTime(DateTime.Now.Year, 2, 29); } - } - } - - /// - /// Provides fluent date accessors for March - /// - public class March - { - /// - /// The nth day of March of the current year - /// - public static DateTime The(int dayNumber) - { - return new DateTime(DateTime.Now.Year, 3, dayNumber); - } - - /// - /// The 1st day of March of the current year - /// - public static DateTime The1st - { - get { return new DateTime(DateTime.Now.Year, 3, 1); } - } - - /// - /// The 2nd day of March of the current year - /// - public static DateTime The2nd - { - get { return new DateTime(DateTime.Now.Year, 3, 2); } - } - - /// - /// The 3rd day of March of the current year - /// - public static DateTime The3rd - { - get { return new DateTime(DateTime.Now.Year, 3, 3); } - } - - /// - /// The 4th day of March of the current year - /// - public static DateTime The4th - { - get { return new DateTime(DateTime.Now.Year, 3, 4); } - } - - /// - /// The 5th day of March of the current year - /// - public static DateTime The5th - { - get { return new DateTime(DateTime.Now.Year, 3, 5); } - } - - /// - /// The 6th day of March of the current year - /// - public static DateTime The6th - { - get { return new DateTime(DateTime.Now.Year, 3, 6); } - } - - /// - /// The 7th day of March of the current year - /// - public static DateTime The7th - { - get { return new DateTime(DateTime.Now.Year, 3, 7); } - } - - /// - /// The 8th day of March of the current year - /// - public static DateTime The8th - { - get { return new DateTime(DateTime.Now.Year, 3, 8); } - } - - /// - /// The 9th day of March of the current year - /// - public static DateTime The9th - { - get { return new DateTime(DateTime.Now.Year, 3, 9); } - } - - /// - /// The 10th day of March of the current year - /// - public static DateTime The10th - { - get { return new DateTime(DateTime.Now.Year, 3, 10); } - } - - /// - /// The 11th day of March of the current year - /// - public static DateTime The11th - { - get { return new DateTime(DateTime.Now.Year, 3, 11); } - } - - /// - /// The 12th day of March of the current year - /// - public static DateTime The12th - { - get { return new DateTime(DateTime.Now.Year, 3, 12); } - } - - /// - /// The 13th day of March of the current year - /// - public static DateTime The13th - { - get { return new DateTime(DateTime.Now.Year, 3, 13); } - } - - /// - /// The 14th day of March of the current year - /// - public static DateTime The14th - { - get { return new DateTime(DateTime.Now.Year, 3, 14); } - } - - /// - /// The 15th day of March of the current year - /// - public static DateTime The15th - { - get { return new DateTime(DateTime.Now.Year, 3, 15); } - } - - /// - /// The 16th day of March of the current year - /// - public static DateTime The16th - { - get { return new DateTime(DateTime.Now.Year, 3, 16); } - } - - /// - /// The 17th day of March of the current year - /// - public static DateTime The17th - { - get { return new DateTime(DateTime.Now.Year, 3, 17); } - } - - /// - /// The 18th day of March of the current year - /// - public static DateTime The18th - { - get { return new DateTime(DateTime.Now.Year, 3, 18); } - } - - /// - /// The 19th day of March of the current year - /// - public static DateTime The19th - { - get { return new DateTime(DateTime.Now.Year, 3, 19); } - } - - /// - /// The 20th day of March of the current year - /// - public static DateTime The20th - { - get { return new DateTime(DateTime.Now.Year, 3, 20); } - } - - /// - /// The 21st day of March of the current year - /// - public static DateTime The21st - { - get { return new DateTime(DateTime.Now.Year, 3, 21); } - } - - /// - /// The 22nd day of March of the current year - /// - public static DateTime The22nd - { - get { return new DateTime(DateTime.Now.Year, 3, 22); } - } - - /// - /// The 23rd day of March of the current year - /// - public static DateTime The23rd - { - get { return new DateTime(DateTime.Now.Year, 3, 23); } - } - - /// - /// The 24th day of March of the current year - /// - public static DateTime The24th - { - get { return new DateTime(DateTime.Now.Year, 3, 24); } - } - - /// - /// The 25th day of March of the current year - /// - public static DateTime The25th - { - get { return new DateTime(DateTime.Now.Year, 3, 25); } - } - - /// - /// The 26th day of March of the current year - /// - public static DateTime The26th - { - get { return new DateTime(DateTime.Now.Year, 3, 26); } - } - - /// - /// The 27th day of March of the current year - /// - public static DateTime The27th - { - get { return new DateTime(DateTime.Now.Year, 3, 27); } - } - - /// - /// The 28th day of March of the current year - /// - public static DateTime The28th - { - get { return new DateTime(DateTime.Now.Year, 3, 28); } - } - - /// - /// The 29th day of March of the current year - /// - public static DateTime The29th - { - get { return new DateTime(DateTime.Now.Year, 3, 29); } - } - - /// - /// The 30th day of March of the current year - /// - public static DateTime The30th - { - get { return new DateTime(DateTime.Now.Year, 3, 30); } - } - - /// - /// The 31st day of March of the current year - /// - public static DateTime The31st - { - get { return new DateTime(DateTime.Now.Year, 3, 31); } - } - } - - /// - /// Provides fluent date accessors for April - /// - public class April - { - /// - /// The nth day of April of the current year - /// - public static DateTime The(int dayNumber) - { - return new DateTime(DateTime.Now.Year, 4, dayNumber); - } - - /// - /// The 1st day of April of the current year - /// - public static DateTime The1st - { - get { return new DateTime(DateTime.Now.Year, 4, 1); } - } - - /// - /// The 2nd day of April of the current year - /// - public static DateTime The2nd - { - get { return new DateTime(DateTime.Now.Year, 4, 2); } - } - - /// - /// The 3rd day of April of the current year - /// - public static DateTime The3rd - { - get { return new DateTime(DateTime.Now.Year, 4, 3); } - } - - /// - /// The 4th day of April of the current year - /// - public static DateTime The4th - { - get { return new DateTime(DateTime.Now.Year, 4, 4); } - } - - /// - /// The 5th day of April of the current year - /// - public static DateTime The5th - { - get { return new DateTime(DateTime.Now.Year, 4, 5); } - } - - /// - /// The 6th day of April of the current year - /// - public static DateTime The6th - { - get { return new DateTime(DateTime.Now.Year, 4, 6); } - } - - /// - /// The 7th day of April of the current year - /// - public static DateTime The7th - { - get { return new DateTime(DateTime.Now.Year, 4, 7); } - } - - /// - /// The 8th day of April of the current year - /// - public static DateTime The8th - { - get { return new DateTime(DateTime.Now.Year, 4, 8); } - } - - /// - /// The 9th day of April of the current year - /// - public static DateTime The9th - { - get { return new DateTime(DateTime.Now.Year, 4, 9); } - } - - /// - /// The 10th day of April of the current year - /// - public static DateTime The10th - { - get { return new DateTime(DateTime.Now.Year, 4, 10); } - } - - /// - /// The 11th day of April of the current year - /// - public static DateTime The11th - { - get { return new DateTime(DateTime.Now.Year, 4, 11); } - } - - /// - /// The 12th day of April of the current year - /// - public static DateTime The12th - { - get { return new DateTime(DateTime.Now.Year, 4, 12); } - } - - /// - /// The 13th day of April of the current year - /// - public static DateTime The13th - { - get { return new DateTime(DateTime.Now.Year, 4, 13); } - } - - /// - /// The 14th day of April of the current year - /// - public static DateTime The14th - { - get { return new DateTime(DateTime.Now.Year, 4, 14); } - } - - /// - /// The 15th day of April of the current year - /// - public static DateTime The15th - { - get { return new DateTime(DateTime.Now.Year, 4, 15); } - } - - /// - /// The 16th day of April of the current year - /// - public static DateTime The16th - { - get { return new DateTime(DateTime.Now.Year, 4, 16); } - } - - /// - /// The 17th day of April of the current year - /// - public static DateTime The17th - { - get { return new DateTime(DateTime.Now.Year, 4, 17); } - } - - /// - /// The 18th day of April of the current year - /// - public static DateTime The18th - { - get { return new DateTime(DateTime.Now.Year, 4, 18); } - } - - /// - /// The 19th day of April of the current year - /// - public static DateTime The19th - { - get { return new DateTime(DateTime.Now.Year, 4, 19); } - } - - /// - /// The 20th day of April of the current year - /// - public static DateTime The20th - { - get { return new DateTime(DateTime.Now.Year, 4, 20); } - } - - /// - /// The 21st day of April of the current year - /// - public static DateTime The21st - { - get { return new DateTime(DateTime.Now.Year, 4, 21); } - } - - /// - /// The 22nd day of April of the current year - /// - public static DateTime The22nd - { - get { return new DateTime(DateTime.Now.Year, 4, 22); } - } - - /// - /// The 23rd day of April of the current year - /// - public static DateTime The23rd - { - get { return new DateTime(DateTime.Now.Year, 4, 23); } - } - - /// - /// The 24th day of April of the current year - /// - public static DateTime The24th - { - get { return new DateTime(DateTime.Now.Year, 4, 24); } - } - - /// - /// The 25th day of April of the current year - /// - public static DateTime The25th - { - get { return new DateTime(DateTime.Now.Year, 4, 25); } - } - - /// - /// The 26th day of April of the current year - /// - public static DateTime The26th - { - get { return new DateTime(DateTime.Now.Year, 4, 26); } - } - - /// - /// The 27th day of April of the current year - /// - public static DateTime The27th - { - get { return new DateTime(DateTime.Now.Year, 4, 27); } - } - - /// - /// The 28th day of April of the current year - /// - public static DateTime The28th - { - get { return new DateTime(DateTime.Now.Year, 4, 28); } - } - - /// - /// The 29th day of April of the current year - /// - public static DateTime The29th - { - get { return new DateTime(DateTime.Now.Year, 4, 29); } - } - - /// - /// The 30th day of April of the current year - /// - public static DateTime The30th - { - get { return new DateTime(DateTime.Now.Year, 4, 30); } - } - } - - /// - /// Provides fluent date accessors for May - /// - public class May - { - /// - /// The nth day of May of the current year - /// - public static DateTime The(int dayNumber) - { - return new DateTime(DateTime.Now.Year, 5, dayNumber); - } - - /// - /// The 1st day of May of the current year - /// - public static DateTime The1st - { - get { return new DateTime(DateTime.Now.Year, 5, 1); } - } - - /// - /// The 2nd day of May of the current year - /// - public static DateTime The2nd - { - get { return new DateTime(DateTime.Now.Year, 5, 2); } - } - - /// - /// The 3rd day of May of the current year - /// - public static DateTime The3rd - { - get { return new DateTime(DateTime.Now.Year, 5, 3); } - } - - /// - /// The 4th day of May of the current year - /// - public static DateTime The4th - { - get { return new DateTime(DateTime.Now.Year, 5, 4); } - } - - /// - /// The 5th day of May of the current year - /// - public static DateTime The5th - { - get { return new DateTime(DateTime.Now.Year, 5, 5); } - } - - /// - /// The 6th day of May of the current year - /// - public static DateTime The6th - { - get { return new DateTime(DateTime.Now.Year, 5, 6); } - } - - /// - /// The 7th day of May of the current year - /// - public static DateTime The7th - { - get { return new DateTime(DateTime.Now.Year, 5, 7); } - } - - /// - /// The 8th day of May of the current year - /// - public static DateTime The8th - { - get { return new DateTime(DateTime.Now.Year, 5, 8); } - } - - /// - /// The 9th day of May of the current year - /// - public static DateTime The9th - { - get { return new DateTime(DateTime.Now.Year, 5, 9); } - } - - /// - /// The 10th day of May of the current year - /// - public static DateTime The10th - { - get { return new DateTime(DateTime.Now.Year, 5, 10); } - } - - /// - /// The 11th day of May of the current year - /// - public static DateTime The11th - { - get { return new DateTime(DateTime.Now.Year, 5, 11); } - } - - /// - /// The 12th day of May of the current year - /// - public static DateTime The12th - { - get { return new DateTime(DateTime.Now.Year, 5, 12); } - } - - /// - /// The 13th day of May of the current year - /// - public static DateTime The13th - { - get { return new DateTime(DateTime.Now.Year, 5, 13); } - } - - /// - /// The 14th day of May of the current year - /// - public static DateTime The14th - { - get { return new DateTime(DateTime.Now.Year, 5, 14); } - } - - /// - /// The 15th day of May of the current year - /// - public static DateTime The15th - { - get { return new DateTime(DateTime.Now.Year, 5, 15); } - } - - /// - /// The 16th day of May of the current year - /// - public static DateTime The16th - { - get { return new DateTime(DateTime.Now.Year, 5, 16); } - } - - /// - /// The 17th day of May of the current year - /// - public static DateTime The17th - { - get { return new DateTime(DateTime.Now.Year, 5, 17); } - } - - /// - /// The 18th day of May of the current year - /// - public static DateTime The18th - { - get { return new DateTime(DateTime.Now.Year, 5, 18); } - } - - /// - /// The 19th day of May of the current year - /// - public static DateTime The19th - { - get { return new DateTime(DateTime.Now.Year, 5, 19); } - } - - /// - /// The 20th day of May of the current year - /// - public static DateTime The20th - { - get { return new DateTime(DateTime.Now.Year, 5, 20); } - } - - /// - /// The 21st day of May of the current year - /// - public static DateTime The21st - { - get { return new DateTime(DateTime.Now.Year, 5, 21); } - } - - /// - /// The 22nd day of May of the current year - /// - public static DateTime The22nd - { - get { return new DateTime(DateTime.Now.Year, 5, 22); } - } - - /// - /// The 23rd day of May of the current year - /// - public static DateTime The23rd - { - get { return new DateTime(DateTime.Now.Year, 5, 23); } - } - - /// - /// The 24th day of May of the current year - /// - public static DateTime The24th - { - get { return new DateTime(DateTime.Now.Year, 5, 24); } - } - - /// - /// The 25th day of May of the current year - /// - public static DateTime The25th - { - get { return new DateTime(DateTime.Now.Year, 5, 25); } - } - - /// - /// The 26th day of May of the current year - /// - public static DateTime The26th - { - get { return new DateTime(DateTime.Now.Year, 5, 26); } - } - - /// - /// The 27th day of May of the current year - /// - public static DateTime The27th - { - get { return new DateTime(DateTime.Now.Year, 5, 27); } - } - - /// - /// The 28th day of May of the current year - /// - public static DateTime The28th - { - get { return new DateTime(DateTime.Now.Year, 5, 28); } - } - - /// - /// The 29th day of May of the current year - /// - public static DateTime The29th - { - get { return new DateTime(DateTime.Now.Year, 5, 29); } - } - - /// - /// The 30th day of May of the current year - /// - public static DateTime The30th - { - get { return new DateTime(DateTime.Now.Year, 5, 30); } - } - - /// - /// The 31st day of May of the current year - /// - public static DateTime The31st - { - get { return new DateTime(DateTime.Now.Year, 5, 31); } - } - } - - /// - /// Provides fluent date accessors for June - /// - public class June - { - /// - /// The nth day of June of the current year - /// - public static DateTime The(int dayNumber) - { - return new DateTime(DateTime.Now.Year, 6, dayNumber); - } - - /// - /// The 1st day of June of the current year - /// - public static DateTime The1st - { - get { return new DateTime(DateTime.Now.Year, 6, 1); } - } - - /// - /// The 2nd day of June of the current year - /// - public static DateTime The2nd - { - get { return new DateTime(DateTime.Now.Year, 6, 2); } - } - - /// - /// The 3rd day of June of the current year - /// - public static DateTime The3rd - { - get { return new DateTime(DateTime.Now.Year, 6, 3); } - } - - /// - /// The 4th day of June of the current year - /// - public static DateTime The4th - { - get { return new DateTime(DateTime.Now.Year, 6, 4); } - } - - /// - /// The 5th day of June of the current year - /// - public static DateTime The5th - { - get { return new DateTime(DateTime.Now.Year, 6, 5); } - } - - /// - /// The 6th day of June of the current year - /// - public static DateTime The6th - { - get { return new DateTime(DateTime.Now.Year, 6, 6); } - } - - /// - /// The 7th day of June of the current year - /// - public static DateTime The7th - { - get { return new DateTime(DateTime.Now.Year, 6, 7); } - } - - /// - /// The 8th day of June of the current year - /// - public static DateTime The8th - { - get { return new DateTime(DateTime.Now.Year, 6, 8); } - } - - /// - /// The 9th day of June of the current year - /// - public static DateTime The9th - { - get { return new DateTime(DateTime.Now.Year, 6, 9); } - } - - /// - /// The 10th day of June of the current year - /// - public static DateTime The10th - { - get { return new DateTime(DateTime.Now.Year, 6, 10); } - } - - /// - /// The 11th day of June of the current year - /// - public static DateTime The11th - { - get { return new DateTime(DateTime.Now.Year, 6, 11); } - } - - /// - /// The 12th day of June of the current year - /// - public static DateTime The12th - { - get { return new DateTime(DateTime.Now.Year, 6, 12); } - } - - /// - /// The 13th day of June of the current year - /// - public static DateTime The13th - { - get { return new DateTime(DateTime.Now.Year, 6, 13); } - } - - /// - /// The 14th day of June of the current year - /// - public static DateTime The14th - { - get { return new DateTime(DateTime.Now.Year, 6, 14); } - } - - /// - /// The 15th day of June of the current year - /// - public static DateTime The15th - { - get { return new DateTime(DateTime.Now.Year, 6, 15); } - } - - /// - /// The 16th day of June of the current year - /// - public static DateTime The16th - { - get { return new DateTime(DateTime.Now.Year, 6, 16); } - } - - /// - /// The 17th day of June of the current year - /// - public static DateTime The17th - { - get { return new DateTime(DateTime.Now.Year, 6, 17); } - } - - /// - /// The 18th day of June of the current year - /// - public static DateTime The18th - { - get { return new DateTime(DateTime.Now.Year, 6, 18); } - } - - /// - /// The 19th day of June of the current year - /// - public static DateTime The19th - { - get { return new DateTime(DateTime.Now.Year, 6, 19); } - } - - /// - /// The 20th day of June of the current year - /// - public static DateTime The20th - { - get { return new DateTime(DateTime.Now.Year, 6, 20); } - } - - /// - /// The 21st day of June of the current year - /// - public static DateTime The21st - { - get { return new DateTime(DateTime.Now.Year, 6, 21); } - } - - /// - /// The 22nd day of June of the current year - /// - public static DateTime The22nd - { - get { return new DateTime(DateTime.Now.Year, 6, 22); } - } - - /// - /// The 23rd day of June of the current year - /// - public static DateTime The23rd - { - get { return new DateTime(DateTime.Now.Year, 6, 23); } - } - - /// - /// The 24th day of June of the current year - /// - public static DateTime The24th - { - get { return new DateTime(DateTime.Now.Year, 6, 24); } - } - - /// - /// The 25th day of June of the current year - /// - public static DateTime The25th - { - get { return new DateTime(DateTime.Now.Year, 6, 25); } - } - - /// - /// The 26th day of June of the current year - /// - public static DateTime The26th - { - get { return new DateTime(DateTime.Now.Year, 6, 26); } - } - - /// - /// The 27th day of June of the current year - /// - public static DateTime The27th - { - get { return new DateTime(DateTime.Now.Year, 6, 27); } - } - - /// - /// The 28th day of June of the current year - /// - public static DateTime The28th - { - get { return new DateTime(DateTime.Now.Year, 6, 28); } - } - - /// - /// The 29th day of June of the current year - /// - public static DateTime The29th - { - get { return new DateTime(DateTime.Now.Year, 6, 29); } - } - - /// - /// The 30th day of June of the current year - /// - public static DateTime The30th - { - get { return new DateTime(DateTime.Now.Year, 6, 30); } - } - } - - /// - /// Provides fluent date accessors for July - /// - public class July - { - /// - /// The nth day of July of the current year - /// - public static DateTime The(int dayNumber) - { - return new DateTime(DateTime.Now.Year, 7, dayNumber); - } - - /// - /// The 1st day of July of the current year - /// - public static DateTime The1st - { - get { return new DateTime(DateTime.Now.Year, 7, 1); } - } - - /// - /// The 2nd day of July of the current year - /// - public static DateTime The2nd - { - get { return new DateTime(DateTime.Now.Year, 7, 2); } - } - - /// - /// The 3rd day of July of the current year - /// - public static DateTime The3rd - { - get { return new DateTime(DateTime.Now.Year, 7, 3); } - } - - /// - /// The 4th day of July of the current year - /// - public static DateTime The4th - { - get { return new DateTime(DateTime.Now.Year, 7, 4); } - } - - /// - /// The 5th day of July of the current year - /// - public static DateTime The5th - { - get { return new DateTime(DateTime.Now.Year, 7, 5); } - } - - /// - /// The 6th day of July of the current year - /// - public static DateTime The6th - { - get { return new DateTime(DateTime.Now.Year, 7, 6); } - } - - /// - /// The 7th day of July of the current year - /// - public static DateTime The7th - { - get { return new DateTime(DateTime.Now.Year, 7, 7); } - } - - /// - /// The 8th day of July of the current year - /// - public static DateTime The8th - { - get { return new DateTime(DateTime.Now.Year, 7, 8); } - } - - /// - /// The 9th day of July of the current year - /// - public static DateTime The9th - { - get { return new DateTime(DateTime.Now.Year, 7, 9); } - } - - /// - /// The 10th day of July of the current year - /// - public static DateTime The10th - { - get { return new DateTime(DateTime.Now.Year, 7, 10); } - } - - /// - /// The 11th day of July of the current year - /// - public static DateTime The11th - { - get { return new DateTime(DateTime.Now.Year, 7, 11); } - } - - /// - /// The 12th day of July of the current year - /// - public static DateTime The12th - { - get { return new DateTime(DateTime.Now.Year, 7, 12); } - } - - /// - /// The 13th day of July of the current year - /// - public static DateTime The13th - { - get { return new DateTime(DateTime.Now.Year, 7, 13); } - } - - /// - /// The 14th day of July of the current year - /// - public static DateTime The14th - { - get { return new DateTime(DateTime.Now.Year, 7, 14); } - } - - /// - /// The 15th day of July of the current year - /// - public static DateTime The15th - { - get { return new DateTime(DateTime.Now.Year, 7, 15); } - } - - /// - /// The 16th day of July of the current year - /// - public static DateTime The16th - { - get { return new DateTime(DateTime.Now.Year, 7, 16); } - } - - /// - /// The 17th day of July of the current year - /// - public static DateTime The17th - { - get { return new DateTime(DateTime.Now.Year, 7, 17); } - } - - /// - /// The 18th day of July of the current year - /// - public static DateTime The18th - { - get { return new DateTime(DateTime.Now.Year, 7, 18); } - } - - /// - /// The 19th day of July of the current year - /// - public static DateTime The19th - { - get { return new DateTime(DateTime.Now.Year, 7, 19); } - } - - /// - /// The 20th day of July of the current year - /// - public static DateTime The20th - { - get { return new DateTime(DateTime.Now.Year, 7, 20); } - } - - /// - /// The 21st day of July of the current year - /// - public static DateTime The21st - { - get { return new DateTime(DateTime.Now.Year, 7, 21); } - } - - /// - /// The 22nd day of July of the current year - /// - public static DateTime The22nd - { - get { return new DateTime(DateTime.Now.Year, 7, 22); } - } - - /// - /// The 23rd day of July of the current year - /// - public static DateTime The23rd - { - get { return new DateTime(DateTime.Now.Year, 7, 23); } - } - - /// - /// The 24th day of July of the current year - /// - public static DateTime The24th - { - get { return new DateTime(DateTime.Now.Year, 7, 24); } - } - - /// - /// The 25th day of July of the current year - /// - public static DateTime The25th - { - get { return new DateTime(DateTime.Now.Year, 7, 25); } - } - - /// - /// The 26th day of July of the current year - /// - public static DateTime The26th - { - get { return new DateTime(DateTime.Now.Year, 7, 26); } - } - - /// - /// The 27th day of July of the current year - /// - public static DateTime The27th - { - get { return new DateTime(DateTime.Now.Year, 7, 27); } - } - - /// - /// The 28th day of July of the current year - /// - public static DateTime The28th - { - get { return new DateTime(DateTime.Now.Year, 7, 28); } - } - - /// - /// The 29th day of July of the current year - /// - public static DateTime The29th - { - get { return new DateTime(DateTime.Now.Year, 7, 29); } - } - - /// - /// The 30th day of July of the current year - /// - public static DateTime The30th - { - get { return new DateTime(DateTime.Now.Year, 7, 30); } - } - - /// - /// The 31st day of July of the current year - /// - public static DateTime The31st - { - get { return new DateTime(DateTime.Now.Year, 7, 31); } - } - } - - /// - /// Provides fluent date accessors for August - /// - public class August - { - /// - /// The nth day of August of the current year - /// - public static DateTime The(int dayNumber) - { - return new DateTime(DateTime.Now.Year, 8, dayNumber); - } - - /// - /// The 1st day of August of the current year - /// - public static DateTime The1st - { - get { return new DateTime(DateTime.Now.Year, 8, 1); } - } - - /// - /// The 2nd day of August of the current year - /// - public static DateTime The2nd - { - get { return new DateTime(DateTime.Now.Year, 8, 2); } - } - - /// - /// The 3rd day of August of the current year - /// - public static DateTime The3rd - { - get { return new DateTime(DateTime.Now.Year, 8, 3); } - } - - /// - /// The 4th day of August of the current year - /// - public static DateTime The4th - { - get { return new DateTime(DateTime.Now.Year, 8, 4); } - } - - /// - /// The 5th day of August of the current year - /// - public static DateTime The5th - { - get { return new DateTime(DateTime.Now.Year, 8, 5); } - } - - /// - /// The 6th day of August of the current year - /// - public static DateTime The6th - { - get { return new DateTime(DateTime.Now.Year, 8, 6); } - } - - /// - /// The 7th day of August of the current year - /// - public static DateTime The7th - { - get { return new DateTime(DateTime.Now.Year, 8, 7); } - } - - /// - /// The 8th day of August of the current year - /// - public static DateTime The8th - { - get { return new DateTime(DateTime.Now.Year, 8, 8); } - } - - /// - /// The 9th day of August of the current year - /// - public static DateTime The9th - { - get { return new DateTime(DateTime.Now.Year, 8, 9); } - } - - /// - /// The 10th day of August of the current year - /// - public static DateTime The10th - { - get { return new DateTime(DateTime.Now.Year, 8, 10); } - } - - /// - /// The 11th day of August of the current year - /// - public static DateTime The11th - { - get { return new DateTime(DateTime.Now.Year, 8, 11); } - } - - /// - /// The 12th day of August of the current year - /// - public static DateTime The12th - { - get { return new DateTime(DateTime.Now.Year, 8, 12); } - } - - /// - /// The 13th day of August of the current year - /// - public static DateTime The13th - { - get { return new DateTime(DateTime.Now.Year, 8, 13); } - } - - /// - /// The 14th day of August of the current year - /// - public static DateTime The14th - { - get { return new DateTime(DateTime.Now.Year, 8, 14); } - } - - /// - /// The 15th day of August of the current year - /// - public static DateTime The15th - { - get { return new DateTime(DateTime.Now.Year, 8, 15); } - } - - /// - /// The 16th day of August of the current year - /// - public static DateTime The16th - { - get { return new DateTime(DateTime.Now.Year, 8, 16); } - } - - /// - /// The 17th day of August of the current year - /// - public static DateTime The17th - { - get { return new DateTime(DateTime.Now.Year, 8, 17); } - } - - /// - /// The 18th day of August of the current year - /// - public static DateTime The18th - { - get { return new DateTime(DateTime.Now.Year, 8, 18); } - } - - /// - /// The 19th day of August of the current year - /// - public static DateTime The19th - { - get { return new DateTime(DateTime.Now.Year, 8, 19); } - } - - /// - /// The 20th day of August of the current year - /// - public static DateTime The20th - { - get { return new DateTime(DateTime.Now.Year, 8, 20); } - } - - /// - /// The 21st day of August of the current year - /// - public static DateTime The21st - { - get { return new DateTime(DateTime.Now.Year, 8, 21); } - } - - /// - /// The 22nd day of August of the current year - /// - public static DateTime The22nd - { - get { return new DateTime(DateTime.Now.Year, 8, 22); } - } - - /// - /// The 23rd day of August of the current year - /// - public static DateTime The23rd - { - get { return new DateTime(DateTime.Now.Year, 8, 23); } - } - - /// - /// The 24th day of August of the current year - /// - public static DateTime The24th - { - get { return new DateTime(DateTime.Now.Year, 8, 24); } - } - - /// - /// The 25th day of August of the current year - /// - public static DateTime The25th - { - get { return new DateTime(DateTime.Now.Year, 8, 25); } - } - - /// - /// The 26th day of August of the current year - /// - public static DateTime The26th - { - get { return new DateTime(DateTime.Now.Year, 8, 26); } - } - - /// - /// The 27th day of August of the current year - /// - public static DateTime The27th - { - get { return new DateTime(DateTime.Now.Year, 8, 27); } - } - - /// - /// The 28th day of August of the current year - /// - public static DateTime The28th - { - get { return new DateTime(DateTime.Now.Year, 8, 28); } - } - - /// - /// The 29th day of August of the current year - /// - public static DateTime The29th - { - get { return new DateTime(DateTime.Now.Year, 8, 29); } - } - - /// - /// The 30th day of August of the current year - /// - public static DateTime The30th - { - get { return new DateTime(DateTime.Now.Year, 8, 30); } - } - - /// - /// The 31st day of August of the current year - /// - public static DateTime The31st - { - get { return new DateTime(DateTime.Now.Year, 8, 31); } - } - } - - /// - /// Provides fluent date accessors for September - /// - public class September - { - /// - /// The nth day of September of the current year - /// - public static DateTime The(int dayNumber) - { - return new DateTime(DateTime.Now.Year, 9, dayNumber); - } - - /// - /// The 1st day of September of the current year - /// - public static DateTime The1st - { - get { return new DateTime(DateTime.Now.Year, 9, 1); } - } - - /// - /// The 2nd day of September of the current year - /// - public static DateTime The2nd - { - get { return new DateTime(DateTime.Now.Year, 9, 2); } - } - - /// - /// The 3rd day of September of the current year - /// - public static DateTime The3rd - { - get { return new DateTime(DateTime.Now.Year, 9, 3); } - } - - /// - /// The 4th day of September of the current year - /// - public static DateTime The4th - { - get { return new DateTime(DateTime.Now.Year, 9, 4); } - } - - /// - /// The 5th day of September of the current year - /// - public static DateTime The5th - { - get { return new DateTime(DateTime.Now.Year, 9, 5); } - } - - /// - /// The 6th day of September of the current year - /// - public static DateTime The6th - { - get { return new DateTime(DateTime.Now.Year, 9, 6); } - } - - /// - /// The 7th day of September of the current year - /// - public static DateTime The7th - { - get { return new DateTime(DateTime.Now.Year, 9, 7); } - } - - /// - /// The 8th day of September of the current year - /// - public static DateTime The8th - { - get { return new DateTime(DateTime.Now.Year, 9, 8); } - } - - /// - /// The 9th day of September of the current year - /// - public static DateTime The9th - { - get { return new DateTime(DateTime.Now.Year, 9, 9); } - } - - /// - /// The 10th day of September of the current year - /// - public static DateTime The10th - { - get { return new DateTime(DateTime.Now.Year, 9, 10); } - } - - /// - /// The 11th day of September of the current year - /// - public static DateTime The11th - { - get { return new DateTime(DateTime.Now.Year, 9, 11); } - } - - /// - /// The 12th day of September of the current year - /// - public static DateTime The12th - { - get { return new DateTime(DateTime.Now.Year, 9, 12); } - } - - /// - /// The 13th day of September of the current year - /// - public static DateTime The13th - { - get { return new DateTime(DateTime.Now.Year, 9, 13); } - } - - /// - /// The 14th day of September of the current year - /// - public static DateTime The14th - { - get { return new DateTime(DateTime.Now.Year, 9, 14); } - } - - /// - /// The 15th day of September of the current year - /// - public static DateTime The15th - { - get { return new DateTime(DateTime.Now.Year, 9, 15); } - } - - /// - /// The 16th day of September of the current year - /// - public static DateTime The16th - { - get { return new DateTime(DateTime.Now.Year, 9, 16); } - } - - /// - /// The 17th day of September of the current year - /// - public static DateTime The17th - { - get { return new DateTime(DateTime.Now.Year, 9, 17); } - } - - /// - /// The 18th day of September of the current year - /// - public static DateTime The18th - { - get { return new DateTime(DateTime.Now.Year, 9, 18); } - } - - /// - /// The 19th day of September of the current year - /// - public static DateTime The19th - { - get { return new DateTime(DateTime.Now.Year, 9, 19); } - } - - /// - /// The 20th day of September of the current year - /// - public static DateTime The20th - { - get { return new DateTime(DateTime.Now.Year, 9, 20); } - } - - /// - /// The 21st day of September of the current year - /// - public static DateTime The21st - { - get { return new DateTime(DateTime.Now.Year, 9, 21); } - } - - /// - /// The 22nd day of September of the current year - /// - public static DateTime The22nd - { - get { return new DateTime(DateTime.Now.Year, 9, 22); } - } - - /// - /// The 23rd day of September of the current year - /// - public static DateTime The23rd - { - get { return new DateTime(DateTime.Now.Year, 9, 23); } - } - - /// - /// The 24th day of September of the current year - /// - public static DateTime The24th - { - get { return new DateTime(DateTime.Now.Year, 9, 24); } - } - - /// - /// The 25th day of September of the current year - /// - public static DateTime The25th - { - get { return new DateTime(DateTime.Now.Year, 9, 25); } - } - - /// - /// The 26th day of September of the current year - /// - public static DateTime The26th - { - get { return new DateTime(DateTime.Now.Year, 9, 26); } - } - - /// - /// The 27th day of September of the current year - /// - public static DateTime The27th - { - get { return new DateTime(DateTime.Now.Year, 9, 27); } - } - - /// - /// The 28th day of September of the current year - /// - public static DateTime The28th - { - get { return new DateTime(DateTime.Now.Year, 9, 28); } - } - - /// - /// The 29th day of September of the current year - /// - public static DateTime The29th - { - get { return new DateTime(DateTime.Now.Year, 9, 29); } - } - - /// - /// The 30th day of September of the current year - /// - public static DateTime The30th - { - get { return new DateTime(DateTime.Now.Year, 9, 30); } - } - } - - /// - /// Provides fluent date accessors for October - /// - public class October - { - /// - /// The nth day of October of the current year - /// - public static DateTime The(int dayNumber) - { - return new DateTime(DateTime.Now.Year, 10, dayNumber); - } - - /// - /// The 1st day of October of the current year - /// - public static DateTime The1st - { - get { return new DateTime(DateTime.Now.Year, 10, 1); } - } - - /// - /// The 2nd day of October of the current year - /// - public static DateTime The2nd - { - get { return new DateTime(DateTime.Now.Year, 10, 2); } - } - - /// - /// The 3rd day of October of the current year - /// - public static DateTime The3rd - { - get { return new DateTime(DateTime.Now.Year, 10, 3); } - } - - /// - /// The 4th day of October of the current year - /// - public static DateTime The4th - { - get { return new DateTime(DateTime.Now.Year, 10, 4); } - } - - /// - /// The 5th day of October of the current year - /// - public static DateTime The5th - { - get { return new DateTime(DateTime.Now.Year, 10, 5); } - } - - /// - /// The 6th day of October of the current year - /// - public static DateTime The6th - { - get { return new DateTime(DateTime.Now.Year, 10, 6); } - } - - /// - /// The 7th day of October of the current year - /// - public static DateTime The7th - { - get { return new DateTime(DateTime.Now.Year, 10, 7); } - } - - /// - /// The 8th day of October of the current year - /// - public static DateTime The8th - { - get { return new DateTime(DateTime.Now.Year, 10, 8); } - } - - /// - /// The 9th day of October of the current year - /// - public static DateTime The9th - { - get { return new DateTime(DateTime.Now.Year, 10, 9); } - } - - /// - /// The 10th day of October of the current year - /// - public static DateTime The10th - { - get { return new DateTime(DateTime.Now.Year, 10, 10); } - } - - /// - /// The 11th day of October of the current year - /// - public static DateTime The11th - { - get { return new DateTime(DateTime.Now.Year, 10, 11); } - } - - /// - /// The 12th day of October of the current year - /// - public static DateTime The12th - { - get { return new DateTime(DateTime.Now.Year, 10, 12); } - } - - /// - /// The 13th day of October of the current year - /// - public static DateTime The13th - { - get { return new DateTime(DateTime.Now.Year, 10, 13); } - } - - /// - /// The 14th day of October of the current year - /// - public static DateTime The14th - { - get { return new DateTime(DateTime.Now.Year, 10, 14); } - } - - /// - /// The 15th day of October of the current year - /// - public static DateTime The15th - { - get { return new DateTime(DateTime.Now.Year, 10, 15); } - } - - /// - /// The 16th day of October of the current year - /// - public static DateTime The16th - { - get { return new DateTime(DateTime.Now.Year, 10, 16); } - } - - /// - /// The 17th day of October of the current year - /// - public static DateTime The17th - { - get { return new DateTime(DateTime.Now.Year, 10, 17); } - } - - /// - /// The 18th day of October of the current year - /// - public static DateTime The18th - { - get { return new DateTime(DateTime.Now.Year, 10, 18); } - } - - /// - /// The 19th day of October of the current year - /// - public static DateTime The19th - { - get { return new DateTime(DateTime.Now.Year, 10, 19); } - } - - /// - /// The 20th day of October of the current year - /// - public static DateTime The20th - { - get { return new DateTime(DateTime.Now.Year, 10, 20); } - } - - /// - /// The 21st day of October of the current year - /// - public static DateTime The21st - { - get { return new DateTime(DateTime.Now.Year, 10, 21); } - } - - /// - /// The 22nd day of October of the current year - /// - public static DateTime The22nd - { - get { return new DateTime(DateTime.Now.Year, 10, 22); } - } - - /// - /// The 23rd day of October of the current year - /// - public static DateTime The23rd - { - get { return new DateTime(DateTime.Now.Year, 10, 23); } - } - - /// - /// The 24th day of October of the current year - /// - public static DateTime The24th - { - get { return new DateTime(DateTime.Now.Year, 10, 24); } - } - - /// - /// The 25th day of October of the current year - /// - public static DateTime The25th - { - get { return new DateTime(DateTime.Now.Year, 10, 25); } - } - - /// - /// The 26th day of October of the current year - /// - public static DateTime The26th - { - get { return new DateTime(DateTime.Now.Year, 10, 26); } - } - - /// - /// The 27th day of October of the current year - /// - public static DateTime The27th - { - get { return new DateTime(DateTime.Now.Year, 10, 27); } - } - - /// - /// The 28th day of October of the current year - /// - public static DateTime The28th - { - get { return new DateTime(DateTime.Now.Year, 10, 28); } - } - - /// - /// The 29th day of October of the current year - /// - public static DateTime The29th - { - get { return new DateTime(DateTime.Now.Year, 10, 29); } - } - - /// - /// The 30th day of October of the current year - /// - public static DateTime The30th - { - get { return new DateTime(DateTime.Now.Year, 10, 30); } - } - - /// - /// The 31st day of October of the current year - /// - public static DateTime The31st - { - get { return new DateTime(DateTime.Now.Year, 10, 31); } - } - } - - /// - /// Provides fluent date accessors for November - /// - public class November - { - /// - /// The nth day of November of the current year - /// - public static DateTime The(int dayNumber) - { - return new DateTime(DateTime.Now.Year, 11, dayNumber); - } - - /// - /// The 1st day of November of the current year - /// - public static DateTime The1st - { - get { return new DateTime(DateTime.Now.Year, 11, 1); } - } - - /// - /// The 2nd day of November of the current year - /// - public static DateTime The2nd - { - get { return new DateTime(DateTime.Now.Year, 11, 2); } - } - - /// - /// The 3rd day of November of the current year - /// - public static DateTime The3rd - { - get { return new DateTime(DateTime.Now.Year, 11, 3); } - } - - /// - /// The 4th day of November of the current year - /// - public static DateTime The4th - { - get { return new DateTime(DateTime.Now.Year, 11, 4); } - } - - /// - /// The 5th day of November of the current year - /// - public static DateTime The5th - { - get { return new DateTime(DateTime.Now.Year, 11, 5); } - } - - /// - /// The 6th day of November of the current year - /// - public static DateTime The6th - { - get { return new DateTime(DateTime.Now.Year, 11, 6); } - } - - /// - /// The 7th day of November of the current year - /// - public static DateTime The7th - { - get { return new DateTime(DateTime.Now.Year, 11, 7); } - } - - /// - /// The 8th day of November of the current year - /// - public static DateTime The8th - { - get { return new DateTime(DateTime.Now.Year, 11, 8); } - } - - /// - /// The 9th day of November of the current year - /// - public static DateTime The9th - { - get { return new DateTime(DateTime.Now.Year, 11, 9); } - } - - /// - /// The 10th day of November of the current year - /// - public static DateTime The10th - { - get { return new DateTime(DateTime.Now.Year, 11, 10); } - } - - /// - /// The 11th day of November of the current year - /// - public static DateTime The11th - { - get { return new DateTime(DateTime.Now.Year, 11, 11); } - } - - /// - /// The 12th day of November of the current year - /// - public static DateTime The12th - { - get { return new DateTime(DateTime.Now.Year, 11, 12); } - } - - /// - /// The 13th day of November of the current year - /// - public static DateTime The13th - { - get { return new DateTime(DateTime.Now.Year, 11, 13); } - } - - /// - /// The 14th day of November of the current year - /// - public static DateTime The14th - { - get { return new DateTime(DateTime.Now.Year, 11, 14); } - } - - /// - /// The 15th day of November of the current year - /// - public static DateTime The15th - { - get { return new DateTime(DateTime.Now.Year, 11, 15); } - } - - /// - /// The 16th day of November of the current year - /// - public static DateTime The16th - { - get { return new DateTime(DateTime.Now.Year, 11, 16); } - } - - /// - /// The 17th day of November of the current year - /// - public static DateTime The17th - { - get { return new DateTime(DateTime.Now.Year, 11, 17); } - } - - /// - /// The 18th day of November of the current year - /// - public static DateTime The18th - { - get { return new DateTime(DateTime.Now.Year, 11, 18); } - } - - /// - /// The 19th day of November of the current year - /// - public static DateTime The19th - { - get { return new DateTime(DateTime.Now.Year, 11, 19); } - } - - /// - /// The 20th day of November of the current year - /// - public static DateTime The20th - { - get { return new DateTime(DateTime.Now.Year, 11, 20); } - } - - /// - /// The 21st day of November of the current year - /// - public static DateTime The21st - { - get { return new DateTime(DateTime.Now.Year, 11, 21); } - } - - /// - /// The 22nd day of November of the current year - /// - public static DateTime The22nd - { - get { return new DateTime(DateTime.Now.Year, 11, 22); } - } - - /// - /// The 23rd day of November of the current year - /// - public static DateTime The23rd - { - get { return new DateTime(DateTime.Now.Year, 11, 23); } - } - - /// - /// The 24th day of November of the current year - /// - public static DateTime The24th - { - get { return new DateTime(DateTime.Now.Year, 11, 24); } - } - - /// - /// The 25th day of November of the current year - /// - public static DateTime The25th - { - get { return new DateTime(DateTime.Now.Year, 11, 25); } - } - - /// - /// The 26th day of November of the current year - /// - public static DateTime The26th - { - get { return new DateTime(DateTime.Now.Year, 11, 26); } - } - - /// - /// The 27th day of November of the current year - /// - public static DateTime The27th - { - get { return new DateTime(DateTime.Now.Year, 11, 27); } - } - - /// - /// The 28th day of November of the current year - /// - public static DateTime The28th - { - get { return new DateTime(DateTime.Now.Year, 11, 28); } - } - - /// - /// The 29th day of November of the current year - /// - public static DateTime The29th - { - get { return new DateTime(DateTime.Now.Year, 11, 29); } - } - - /// - /// The 30th day of November of the current year - /// - public static DateTime The30th - { - get { return new DateTime(DateTime.Now.Year, 11, 30); } - } - } - - /// - /// Provides fluent date accessors for December - /// - public class December - { - /// - /// The nth day of December of the current year - /// - public static DateTime The(int dayNumber) - { - return new DateTime(DateTime.Now.Year, 12, dayNumber); - } - - /// - /// The 1st day of December of the current year - /// - public static DateTime The1st - { - get { return new DateTime(DateTime.Now.Year, 12, 1); } - } - - /// - /// The 2nd day of December of the current year - /// - public static DateTime The2nd - { - get { return new DateTime(DateTime.Now.Year, 12, 2); } - } - - /// - /// The 3rd day of December of the current year - /// - public static DateTime The3rd - { - get { return new DateTime(DateTime.Now.Year, 12, 3); } - } - - /// - /// The 4th day of December of the current year - /// - public static DateTime The4th - { - get { return new DateTime(DateTime.Now.Year, 12, 4); } - } - - /// - /// The 5th day of December of the current year - /// - public static DateTime The5th - { - get { return new DateTime(DateTime.Now.Year, 12, 5); } - } - - /// - /// The 6th day of December of the current year - /// - public static DateTime The6th - { - get { return new DateTime(DateTime.Now.Year, 12, 6); } - } - - /// - /// The 7th day of December of the current year - /// - public static DateTime The7th - { - get { return new DateTime(DateTime.Now.Year, 12, 7); } - } - - /// - /// The 8th day of December of the current year - /// - public static DateTime The8th - { - get { return new DateTime(DateTime.Now.Year, 12, 8); } - } - - /// - /// The 9th day of December of the current year - /// - public static DateTime The9th - { - get { return new DateTime(DateTime.Now.Year, 12, 9); } - } - - /// - /// The 10th day of December of the current year - /// - public static DateTime The10th - { - get { return new DateTime(DateTime.Now.Year, 12, 10); } - } - - /// - /// The 11th day of December of the current year - /// - public static DateTime The11th - { - get { return new DateTime(DateTime.Now.Year, 12, 11); } - } - - /// - /// The 12th day of December of the current year - /// - public static DateTime The12th - { - get { return new DateTime(DateTime.Now.Year, 12, 12); } - } - - /// - /// The 13th day of December of the current year - /// - public static DateTime The13th - { - get { return new DateTime(DateTime.Now.Year, 12, 13); } - } - - /// - /// The 14th day of December of the current year - /// - public static DateTime The14th - { - get { return new DateTime(DateTime.Now.Year, 12, 14); } - } - - /// - /// The 15th day of December of the current year - /// - public static DateTime The15th - { - get { return new DateTime(DateTime.Now.Year, 12, 15); } - } - - /// - /// The 16th day of December of the current year - /// - public static DateTime The16th - { - get { return new DateTime(DateTime.Now.Year, 12, 16); } - } - - /// - /// The 17th day of December of the current year - /// - public static DateTime The17th - { - get { return new DateTime(DateTime.Now.Year, 12, 17); } - } - - /// - /// The 18th day of December of the current year - /// - public static DateTime The18th - { - get { return new DateTime(DateTime.Now.Year, 12, 18); } - } - - /// - /// The 19th day of December of the current year - /// - public static DateTime The19th - { - get { return new DateTime(DateTime.Now.Year, 12, 19); } - } - - /// - /// The 20th day of December of the current year - /// - public static DateTime The20th - { - get { return new DateTime(DateTime.Now.Year, 12, 20); } - } - - /// - /// The 21st day of December of the current year - /// - public static DateTime The21st - { - get { return new DateTime(DateTime.Now.Year, 12, 21); } - } - - /// - /// The 22nd day of December of the current year - /// - public static DateTime The22nd - { - get { return new DateTime(DateTime.Now.Year, 12, 22); } - } - - /// - /// The 23rd day of December of the current year - /// - public static DateTime The23rd - { - get { return new DateTime(DateTime.Now.Year, 12, 23); } - } - - /// - /// The 24th day of December of the current year - /// - public static DateTime The24th - { - get { return new DateTime(DateTime.Now.Year, 12, 24); } - } - - /// - /// The 25th day of December of the current year - /// - public static DateTime The25th - { - get { return new DateTime(DateTime.Now.Year, 12, 25); } - } - - /// - /// The 26th day of December of the current year - /// - public static DateTime The26th - { - get { return new DateTime(DateTime.Now.Year, 12, 26); } - } - - /// - /// The 27th day of December of the current year - /// - public static DateTime The27th - { - get { return new DateTime(DateTime.Now.Year, 12, 27); } - } - - /// - /// The 28th day of December of the current year - /// - public static DateTime The28th - { - get { return new DateTime(DateTime.Now.Year, 12, 28); } - } - - /// - /// The 29th day of December of the current year - /// - public static DateTime The29th - { - get { return new DateTime(DateTime.Now.Year, 12, 29); } - } - - /// - /// The 30th day of December of the current year - /// - public static DateTime The30th - { - get { return new DateTime(DateTime.Now.Year, 12, 30); } - } - - /// - /// The 31st day of December of the current year - /// - public static DateTime The31st - { - get { return new DateTime(DateTime.Now.Year, 12, 31); } - } - } - } -} \ No newline at end of file + /// + /// The nth day of March of the current year + /// + public static DateTime The(int dayNumber) + => new(DateTime.Now.Year, 3, dayNumber); + + + /// + /// The 1st day of March of the current year + /// + public static DateTime The1st + => new(DateTime.Now.Year, 3, 1); + + /// + /// The 2nd day of March of the current year + /// + public static DateTime The2nd + => new(DateTime.Now.Year, 3, 2); + + /// + /// The 3rd day of March of the current year + /// + public static DateTime The3rd + => new(DateTime.Now.Year, 3, 3); + + /// + /// The 4th day of March of the current year + /// + public static DateTime The4th + => new(DateTime.Now.Year, 3, 4); + + /// + /// The 5th day of March of the current year + /// + public static DateTime The5th + => new(DateTime.Now.Year, 3, 5); + + /// + /// The 6th day of March of the current year + /// + public static DateTime The6th + => new(DateTime.Now.Year, 3, 6); + + /// + /// The 7th day of March of the current year + /// + public static DateTime The7th + => new(DateTime.Now.Year, 3, 7); + + /// + /// The 8th day of March of the current year + /// + public static DateTime The8th + => new(DateTime.Now.Year, 3, 8); + + /// + /// The 9th day of March of the current year + /// + public static DateTime The9th + => new(DateTime.Now.Year, 3, 9); + + /// + /// The 10th day of March of the current year + /// + public static DateTime The10th + => new(DateTime.Now.Year, 3, 10); + + /// + /// The 11th day of March of the current year + /// + public static DateTime The11th + => new(DateTime.Now.Year, 3, 11); + + /// + /// The 12th day of March of the current year + /// + public static DateTime The12th + => new(DateTime.Now.Year, 3, 12); + + /// + /// The 13th day of March of the current year + /// + public static DateTime The13th + => new(DateTime.Now.Year, 3, 13); + + /// + /// The 14th day of March of the current year + /// + public static DateTime The14th + => new(DateTime.Now.Year, 3, 14); + + /// + /// The 15th day of March of the current year + /// + public static DateTime The15th + => new(DateTime.Now.Year, 3, 15); + + /// + /// The 16th day of March of the current year + /// + public static DateTime The16th + => new(DateTime.Now.Year, 3, 16); + + /// + /// The 17th day of March of the current year + /// + public static DateTime The17th + => new(DateTime.Now.Year, 3, 17); + + /// + /// The 18th day of March of the current year + /// + public static DateTime The18th + => new(DateTime.Now.Year, 3, 18); + + /// + /// The 19th day of March of the current year + /// + public static DateTime The19th + => new(DateTime.Now.Year, 3, 19); + + /// + /// The 20th day of March of the current year + /// + public static DateTime The20th + => new(DateTime.Now.Year, 3, 20); + + /// + /// The 21st day of March of the current year + /// + public static DateTime The21st + => new(DateTime.Now.Year, 3, 21); + + /// + /// The 22nd day of March of the current year + /// + public static DateTime The22nd + => new(DateTime.Now.Year, 3, 22); + + /// + /// The 23rd day of March of the current year + /// + public static DateTime The23rd + => new(DateTime.Now.Year, 3, 23); + + /// + /// The 24th day of March of the current year + /// + public static DateTime The24th + => new(DateTime.Now.Year, 3, 24); + + /// + /// The 25th day of March of the current year + /// + public static DateTime The25th + => new(DateTime.Now.Year, 3, 25); + + /// + /// The 26th day of March of the current year + /// + public static DateTime The26th + => new(DateTime.Now.Year, 3, 26); + + /// + /// The 27th day of March of the current year + /// + public static DateTime The27th + => new(DateTime.Now.Year, 3, 27); + + /// + /// The 28th day of March of the current year + /// + public static DateTime The28th + => new(DateTime.Now.Year, 3, 28); + + /// + /// The 29th day of March of the current year + /// + public static DateTime The29th + => new(DateTime.Now.Year, 3, 29); + + /// + /// The 30th day of March of the current year + /// + public static DateTime The30th + => new(DateTime.Now.Year, 3, 30); + + /// + /// The 31st day of March of the current year + /// + public static DateTime The31st + => new(DateTime.Now.Year, 3, 31); + } + /// + /// Provides fluent date accessors for April + /// + public class April + { + /// + /// The nth day of April of the current year + /// + public static DateTime The(int dayNumber) + => new(DateTime.Now.Year, 4, dayNumber); + + + /// + /// The 1st day of April of the current year + /// + public static DateTime The1st + => new(DateTime.Now.Year, 4, 1); + + /// + /// The 2nd day of April of the current year + /// + public static DateTime The2nd + => new(DateTime.Now.Year, 4, 2); + + /// + /// The 3rd day of April of the current year + /// + public static DateTime The3rd + => new(DateTime.Now.Year, 4, 3); + + /// + /// The 4th day of April of the current year + /// + public static DateTime The4th + => new(DateTime.Now.Year, 4, 4); + + /// + /// The 5th day of April of the current year + /// + public static DateTime The5th + => new(DateTime.Now.Year, 4, 5); + + /// + /// The 6th day of April of the current year + /// + public static DateTime The6th + => new(DateTime.Now.Year, 4, 6); + + /// + /// The 7th day of April of the current year + /// + public static DateTime The7th + => new(DateTime.Now.Year, 4, 7); + + /// + /// The 8th day of April of the current year + /// + public static DateTime The8th + => new(DateTime.Now.Year, 4, 8); + + /// + /// The 9th day of April of the current year + /// + public static DateTime The9th + => new(DateTime.Now.Year, 4, 9); + + /// + /// The 10th day of April of the current year + /// + public static DateTime The10th + => new(DateTime.Now.Year, 4, 10); + + /// + /// The 11th day of April of the current year + /// + public static DateTime The11th + => new(DateTime.Now.Year, 4, 11); + + /// + /// The 12th day of April of the current year + /// + public static DateTime The12th + => new(DateTime.Now.Year, 4, 12); + + /// + /// The 13th day of April of the current year + /// + public static DateTime The13th + => new(DateTime.Now.Year, 4, 13); + + /// + /// The 14th day of April of the current year + /// + public static DateTime The14th + => new(DateTime.Now.Year, 4, 14); + + /// + /// The 15th day of April of the current year + /// + public static DateTime The15th + => new(DateTime.Now.Year, 4, 15); + + /// + /// The 16th day of April of the current year + /// + public static DateTime The16th + => new(DateTime.Now.Year, 4, 16); + + /// + /// The 17th day of April of the current year + /// + public static DateTime The17th + => new(DateTime.Now.Year, 4, 17); + + /// + /// The 18th day of April of the current year + /// + public static DateTime The18th + => new(DateTime.Now.Year, 4, 18); + + /// + /// The 19th day of April of the current year + /// + public static DateTime The19th + => new(DateTime.Now.Year, 4, 19); + + /// + /// The 20th day of April of the current year + /// + public static DateTime The20th + => new(DateTime.Now.Year, 4, 20); + + /// + /// The 21st day of April of the current year + /// + public static DateTime The21st + => new(DateTime.Now.Year, 4, 21); + + /// + /// The 22nd day of April of the current year + /// + public static DateTime The22nd + => new(DateTime.Now.Year, 4, 22); + + /// + /// The 23rd day of April of the current year + /// + public static DateTime The23rd + => new(DateTime.Now.Year, 4, 23); + + /// + /// The 24th day of April of the current year + /// + public static DateTime The24th + => new(DateTime.Now.Year, 4, 24); + + /// + /// The 25th day of April of the current year + /// + public static DateTime The25th + => new(DateTime.Now.Year, 4, 25); + + /// + /// The 26th day of April of the current year + /// + public static DateTime The26th + => new(DateTime.Now.Year, 4, 26); + + /// + /// The 27th day of April of the current year + /// + public static DateTime The27th + => new(DateTime.Now.Year, 4, 27); + + /// + /// The 28th day of April of the current year + /// + public static DateTime The28th + => new(DateTime.Now.Year, 4, 28); + + /// + /// The 29th day of April of the current year + /// + public static DateTime The29th + => new(DateTime.Now.Year, 4, 29); + + /// + /// The 30th day of April of the current year + /// + public static DateTime The30th + => new(DateTime.Now.Year, 4, 30); + } + /// + /// Provides fluent date accessors for May + /// + public class May + { + /// + /// The nth day of May of the current year + /// + public static DateTime The(int dayNumber) + => new(DateTime.Now.Year, 5, dayNumber); + + + /// + /// The 1st day of May of the current year + /// + public static DateTime The1st + => new(DateTime.Now.Year, 5, 1); + + /// + /// The 2nd day of May of the current year + /// + public static DateTime The2nd + => new(DateTime.Now.Year, 5, 2); + + /// + /// The 3rd day of May of the current year + /// + public static DateTime The3rd + => new(DateTime.Now.Year, 5, 3); + + /// + /// The 4th day of May of the current year + /// + public static DateTime The4th + => new(DateTime.Now.Year, 5, 4); + + /// + /// The 5th day of May of the current year + /// + public static DateTime The5th + => new(DateTime.Now.Year, 5, 5); + + /// + /// The 6th day of May of the current year + /// + public static DateTime The6th + => new(DateTime.Now.Year, 5, 6); + + /// + /// The 7th day of May of the current year + /// + public static DateTime The7th + => new(DateTime.Now.Year, 5, 7); + + /// + /// The 8th day of May of the current year + /// + public static DateTime The8th + => new(DateTime.Now.Year, 5, 8); + + /// + /// The 9th day of May of the current year + /// + public static DateTime The9th + => new(DateTime.Now.Year, 5, 9); + + /// + /// The 10th day of May of the current year + /// + public static DateTime The10th + => new(DateTime.Now.Year, 5, 10); + + /// + /// The 11th day of May of the current year + /// + public static DateTime The11th + => new(DateTime.Now.Year, 5, 11); + + /// + /// The 12th day of May of the current year + /// + public static DateTime The12th + => new(DateTime.Now.Year, 5, 12); + + /// + /// The 13th day of May of the current year + /// + public static DateTime The13th + => new(DateTime.Now.Year, 5, 13); + + /// + /// The 14th day of May of the current year + /// + public static DateTime The14th + => new(DateTime.Now.Year, 5, 14); + + /// + /// The 15th day of May of the current year + /// + public static DateTime The15th + => new(DateTime.Now.Year, 5, 15); + + /// + /// The 16th day of May of the current year + /// + public static DateTime The16th + => new(DateTime.Now.Year, 5, 16); + + /// + /// The 17th day of May of the current year + /// + public static DateTime The17th + => new(DateTime.Now.Year, 5, 17); + + /// + /// The 18th day of May of the current year + /// + public static DateTime The18th + => new(DateTime.Now.Year, 5, 18); + + /// + /// The 19th day of May of the current year + /// + public static DateTime The19th + => new(DateTime.Now.Year, 5, 19); + + /// + /// The 20th day of May of the current year + /// + public static DateTime The20th + => new(DateTime.Now.Year, 5, 20); + + /// + /// The 21st day of May of the current year + /// + public static DateTime The21st + => new(DateTime.Now.Year, 5, 21); + + /// + /// The 22nd day of May of the current year + /// + public static DateTime The22nd + => new(DateTime.Now.Year, 5, 22); + + /// + /// The 23rd day of May of the current year + /// + public static DateTime The23rd + => new(DateTime.Now.Year, 5, 23); + + /// + /// The 24th day of May of the current year + /// + public static DateTime The24th + => new(DateTime.Now.Year, 5, 24); + + /// + /// The 25th day of May of the current year + /// + public static DateTime The25th + => new(DateTime.Now.Year, 5, 25); + + /// + /// The 26th day of May of the current year + /// + public static DateTime The26th + => new(DateTime.Now.Year, 5, 26); + + /// + /// The 27th day of May of the current year + /// + public static DateTime The27th + => new(DateTime.Now.Year, 5, 27); + + /// + /// The 28th day of May of the current year + /// + public static DateTime The28th + => new(DateTime.Now.Year, 5, 28); + + /// + /// The 29th day of May of the current year + /// + public static DateTime The29th + => new(DateTime.Now.Year, 5, 29); + + /// + /// The 30th day of May of the current year + /// + public static DateTime The30th + => new(DateTime.Now.Year, 5, 30); + + /// + /// The 31st day of May of the current year + /// + public static DateTime The31st + => new(DateTime.Now.Year, 5, 31); + } + /// + /// Provides fluent date accessors for June + /// + public class June + { + /// + /// The nth day of June of the current year + /// + public static DateTime The(int dayNumber) + => new(DateTime.Now.Year, 6, dayNumber); + + + /// + /// The 1st day of June of the current year + /// + public static DateTime The1st + => new(DateTime.Now.Year, 6, 1); + + /// + /// The 2nd day of June of the current year + /// + public static DateTime The2nd + => new(DateTime.Now.Year, 6, 2); + + /// + /// The 3rd day of June of the current year + /// + public static DateTime The3rd + => new(DateTime.Now.Year, 6, 3); + + /// + /// The 4th day of June of the current year + /// + public static DateTime The4th + => new(DateTime.Now.Year, 6, 4); + + /// + /// The 5th day of June of the current year + /// + public static DateTime The5th + => new(DateTime.Now.Year, 6, 5); + + /// + /// The 6th day of June of the current year + /// + public static DateTime The6th + => new(DateTime.Now.Year, 6, 6); + + /// + /// The 7th day of June of the current year + /// + public static DateTime The7th + => new(DateTime.Now.Year, 6, 7); + + /// + /// The 8th day of June of the current year + /// + public static DateTime The8th + => new(DateTime.Now.Year, 6, 8); + + /// + /// The 9th day of June of the current year + /// + public static DateTime The9th + => new(DateTime.Now.Year, 6, 9); + + /// + /// The 10th day of June of the current year + /// + public static DateTime The10th + => new(DateTime.Now.Year, 6, 10); + + /// + /// The 11th day of June of the current year + /// + public static DateTime The11th + => new(DateTime.Now.Year, 6, 11); + + /// + /// The 12th day of June of the current year + /// + public static DateTime The12th + => new(DateTime.Now.Year, 6, 12); + + /// + /// The 13th day of June of the current year + /// + public static DateTime The13th + => new(DateTime.Now.Year, 6, 13); + + /// + /// The 14th day of June of the current year + /// + public static DateTime The14th + => new(DateTime.Now.Year, 6, 14); + + /// + /// The 15th day of June of the current year + /// + public static DateTime The15th + => new(DateTime.Now.Year, 6, 15); + + /// + /// The 16th day of June of the current year + /// + public static DateTime The16th + => new(DateTime.Now.Year, 6, 16); + + /// + /// The 17th day of June of the current year + /// + public static DateTime The17th + => new(DateTime.Now.Year, 6, 17); + + /// + /// The 18th day of June of the current year + /// + public static DateTime The18th + => new(DateTime.Now.Year, 6, 18); + + /// + /// The 19th day of June of the current year + /// + public static DateTime The19th + => new(DateTime.Now.Year, 6, 19); + + /// + /// The 20th day of June of the current year + /// + public static DateTime The20th + => new(DateTime.Now.Year, 6, 20); + + /// + /// The 21st day of June of the current year + /// + public static DateTime The21st + => new(DateTime.Now.Year, 6, 21); + + /// + /// The 22nd day of June of the current year + /// + public static DateTime The22nd + => new(DateTime.Now.Year, 6, 22); + + /// + /// The 23rd day of June of the current year + /// + public static DateTime The23rd + => new(DateTime.Now.Year, 6, 23); + + /// + /// The 24th day of June of the current year + /// + public static DateTime The24th + => new(DateTime.Now.Year, 6, 24); + + /// + /// The 25th day of June of the current year + /// + public static DateTime The25th + => new(DateTime.Now.Year, 6, 25); + + /// + /// The 26th day of June of the current year + /// + public static DateTime The26th + => new(DateTime.Now.Year, 6, 26); + + /// + /// The 27th day of June of the current year + /// + public static DateTime The27th + => new(DateTime.Now.Year, 6, 27); + + /// + /// The 28th day of June of the current year + /// + public static DateTime The28th + => new(DateTime.Now.Year, 6, 28); + + /// + /// The 29th day of June of the current year + /// + public static DateTime The29th + => new(DateTime.Now.Year, 6, 29); + + /// + /// The 30th day of June of the current year + /// + public static DateTime The30th + => new(DateTime.Now.Year, 6, 30); + } + /// + /// Provides fluent date accessors for July + /// + public class July + { + /// + /// The nth day of July of the current year + /// + public static DateTime The(int dayNumber) + => new(DateTime.Now.Year, 7, dayNumber); + + + /// + /// The 1st day of July of the current year + /// + public static DateTime The1st + => new(DateTime.Now.Year, 7, 1); + + /// + /// The 2nd day of July of the current year + /// + public static DateTime The2nd + => new(DateTime.Now.Year, 7, 2); + + /// + /// The 3rd day of July of the current year + /// + public static DateTime The3rd + => new(DateTime.Now.Year, 7, 3); + + /// + /// The 4th day of July of the current year + /// + public static DateTime The4th + => new(DateTime.Now.Year, 7, 4); + + /// + /// The 5th day of July of the current year + /// + public static DateTime The5th + => new(DateTime.Now.Year, 7, 5); + + /// + /// The 6th day of July of the current year + /// + public static DateTime The6th + => new(DateTime.Now.Year, 7, 6); + + /// + /// The 7th day of July of the current year + /// + public static DateTime The7th + => new(DateTime.Now.Year, 7, 7); + + /// + /// The 8th day of July of the current year + /// + public static DateTime The8th + => new(DateTime.Now.Year, 7, 8); + + /// + /// The 9th day of July of the current year + /// + public static DateTime The9th + => new(DateTime.Now.Year, 7, 9); + + /// + /// The 10th day of July of the current year + /// + public static DateTime The10th + => new(DateTime.Now.Year, 7, 10); + + /// + /// The 11th day of July of the current year + /// + public static DateTime The11th + => new(DateTime.Now.Year, 7, 11); + + /// + /// The 12th day of July of the current year + /// + public static DateTime The12th + => new(DateTime.Now.Year, 7, 12); + + /// + /// The 13th day of July of the current year + /// + public static DateTime The13th + => new(DateTime.Now.Year, 7, 13); + + /// + /// The 14th day of July of the current year + /// + public static DateTime The14th + => new(DateTime.Now.Year, 7, 14); + + /// + /// The 15th day of July of the current year + /// + public static DateTime The15th + => new(DateTime.Now.Year, 7, 15); + + /// + /// The 16th day of July of the current year + /// + public static DateTime The16th + => new(DateTime.Now.Year, 7, 16); + + /// + /// The 17th day of July of the current year + /// + public static DateTime The17th + => new(DateTime.Now.Year, 7, 17); + + /// + /// The 18th day of July of the current year + /// + public static DateTime The18th + => new(DateTime.Now.Year, 7, 18); + + /// + /// The 19th day of July of the current year + /// + public static DateTime The19th + => new(DateTime.Now.Year, 7, 19); + + /// + /// The 20th day of July of the current year + /// + public static DateTime The20th + => new(DateTime.Now.Year, 7, 20); + + /// + /// The 21st day of July of the current year + /// + public static DateTime The21st + => new(DateTime.Now.Year, 7, 21); + + /// + /// The 22nd day of July of the current year + /// + public static DateTime The22nd + => new(DateTime.Now.Year, 7, 22); + + /// + /// The 23rd day of July of the current year + /// + public static DateTime The23rd + => new(DateTime.Now.Year, 7, 23); + + /// + /// The 24th day of July of the current year + /// + public static DateTime The24th + => new(DateTime.Now.Year, 7, 24); + + /// + /// The 25th day of July of the current year + /// + public static DateTime The25th + => new(DateTime.Now.Year, 7, 25); + + /// + /// The 26th day of July of the current year + /// + public static DateTime The26th + => new(DateTime.Now.Year, 7, 26); + + /// + /// The 27th day of July of the current year + /// + public static DateTime The27th + => new(DateTime.Now.Year, 7, 27); + + /// + /// The 28th day of July of the current year + /// + public static DateTime The28th + => new(DateTime.Now.Year, 7, 28); + + /// + /// The 29th day of July of the current year + /// + public static DateTime The29th + => new(DateTime.Now.Year, 7, 29); + + /// + /// The 30th day of July of the current year + /// + public static DateTime The30th + => new(DateTime.Now.Year, 7, 30); + + /// + /// The 31st day of July of the current year + /// + public static DateTime The31st + => new(DateTime.Now.Year, 7, 31); + } + /// + /// Provides fluent date accessors for August + /// + public class August + { + /// + /// The nth day of August of the current year + /// + public static DateTime The(int dayNumber) + => new(DateTime.Now.Year, 8, dayNumber); + + + /// + /// The 1st day of August of the current year + /// + public static DateTime The1st + => new(DateTime.Now.Year, 8, 1); + + /// + /// The 2nd day of August of the current year + /// + public static DateTime The2nd + => new(DateTime.Now.Year, 8, 2); + + /// + /// The 3rd day of August of the current year + /// + public static DateTime The3rd + => new(DateTime.Now.Year, 8, 3); + + /// + /// The 4th day of August of the current year + /// + public static DateTime The4th + => new(DateTime.Now.Year, 8, 4); + + /// + /// The 5th day of August of the current year + /// + public static DateTime The5th + => new(DateTime.Now.Year, 8, 5); + + /// + /// The 6th day of August of the current year + /// + public static DateTime The6th + => new(DateTime.Now.Year, 8, 6); + + /// + /// The 7th day of August of the current year + /// + public static DateTime The7th + => new(DateTime.Now.Year, 8, 7); + + /// + /// The 8th day of August of the current year + /// + public static DateTime The8th + => new(DateTime.Now.Year, 8, 8); + + /// + /// The 9th day of August of the current year + /// + public static DateTime The9th + => new(DateTime.Now.Year, 8, 9); + + /// + /// The 10th day of August of the current year + /// + public static DateTime The10th + => new(DateTime.Now.Year, 8, 10); + + /// + /// The 11th day of August of the current year + /// + public static DateTime The11th + => new(DateTime.Now.Year, 8, 11); + + /// + /// The 12th day of August of the current year + /// + public static DateTime The12th + => new(DateTime.Now.Year, 8, 12); + + /// + /// The 13th day of August of the current year + /// + public static DateTime The13th + => new(DateTime.Now.Year, 8, 13); + + /// + /// The 14th day of August of the current year + /// + public static DateTime The14th + => new(DateTime.Now.Year, 8, 14); + + /// + /// The 15th day of August of the current year + /// + public static DateTime The15th + => new(DateTime.Now.Year, 8, 15); + + /// + /// The 16th day of August of the current year + /// + public static DateTime The16th + => new(DateTime.Now.Year, 8, 16); + + /// + /// The 17th day of August of the current year + /// + public static DateTime The17th + => new(DateTime.Now.Year, 8, 17); + + /// + /// The 18th day of August of the current year + /// + public static DateTime The18th + => new(DateTime.Now.Year, 8, 18); + + /// + /// The 19th day of August of the current year + /// + public static DateTime The19th + => new(DateTime.Now.Year, 8, 19); + + /// + /// The 20th day of August of the current year + /// + public static DateTime The20th + => new(DateTime.Now.Year, 8, 20); + + /// + /// The 21st day of August of the current year + /// + public static DateTime The21st + => new(DateTime.Now.Year, 8, 21); + + /// + /// The 22nd day of August of the current year + /// + public static DateTime The22nd + => new(DateTime.Now.Year, 8, 22); + + /// + /// The 23rd day of August of the current year + /// + public static DateTime The23rd + => new(DateTime.Now.Year, 8, 23); + + /// + /// The 24th day of August of the current year + /// + public static DateTime The24th + => new(DateTime.Now.Year, 8, 24); + + /// + /// The 25th day of August of the current year + /// + public static DateTime The25th + => new(DateTime.Now.Year, 8, 25); + + /// + /// The 26th day of August of the current year + /// + public static DateTime The26th + => new(DateTime.Now.Year, 8, 26); + + /// + /// The 27th day of August of the current year + /// + public static DateTime The27th + => new(DateTime.Now.Year, 8, 27); + + /// + /// The 28th day of August of the current year + /// + public static DateTime The28th + => new(DateTime.Now.Year, 8, 28); + + /// + /// The 29th day of August of the current year + /// + public static DateTime The29th + => new(DateTime.Now.Year, 8, 29); + + /// + /// The 30th day of August of the current year + /// + public static DateTime The30th + => new(DateTime.Now.Year, 8, 30); + + /// + /// The 31st day of August of the current year + /// + public static DateTime The31st + => new(DateTime.Now.Year, 8, 31); + } + /// + /// Provides fluent date accessors for September + /// + public class September + { + /// + /// The nth day of September of the current year + /// + public static DateTime The(int dayNumber) + => new(DateTime.Now.Year, 9, dayNumber); + + + /// + /// The 1st day of September of the current year + /// + public static DateTime The1st + => new(DateTime.Now.Year, 9, 1); + + /// + /// The 2nd day of September of the current year + /// + public static DateTime The2nd + => new(DateTime.Now.Year, 9, 2); + + /// + /// The 3rd day of September of the current year + /// + public static DateTime The3rd + => new(DateTime.Now.Year, 9, 3); + + /// + /// The 4th day of September of the current year + /// + public static DateTime The4th + => new(DateTime.Now.Year, 9, 4); + + /// + /// The 5th day of September of the current year + /// + public static DateTime The5th + => new(DateTime.Now.Year, 9, 5); + + /// + /// The 6th day of September of the current year + /// + public static DateTime The6th + => new(DateTime.Now.Year, 9, 6); + + /// + /// The 7th day of September of the current year + /// + public static DateTime The7th + => new(DateTime.Now.Year, 9, 7); + + /// + /// The 8th day of September of the current year + /// + public static DateTime The8th + => new(DateTime.Now.Year, 9, 8); + + /// + /// The 9th day of September of the current year + /// + public static DateTime The9th + => new(DateTime.Now.Year, 9, 9); + + /// + /// The 10th day of September of the current year + /// + public static DateTime The10th + => new(DateTime.Now.Year, 9, 10); + + /// + /// The 11th day of September of the current year + /// + public static DateTime The11th + => new(DateTime.Now.Year, 9, 11); + + /// + /// The 12th day of September of the current year + /// + public static DateTime The12th + => new(DateTime.Now.Year, 9, 12); + + /// + /// The 13th day of September of the current year + /// + public static DateTime The13th + => new(DateTime.Now.Year, 9, 13); + + /// + /// The 14th day of September of the current year + /// + public static DateTime The14th + => new(DateTime.Now.Year, 9, 14); + + /// + /// The 15th day of September of the current year + /// + public static DateTime The15th + => new(DateTime.Now.Year, 9, 15); + + /// + /// The 16th day of September of the current year + /// + public static DateTime The16th + => new(DateTime.Now.Year, 9, 16); + + /// + /// The 17th day of September of the current year + /// + public static DateTime The17th + => new(DateTime.Now.Year, 9, 17); + + /// + /// The 18th day of September of the current year + /// + public static DateTime The18th + => new(DateTime.Now.Year, 9, 18); + + /// + /// The 19th day of September of the current year + /// + public static DateTime The19th + => new(DateTime.Now.Year, 9, 19); + + /// + /// The 20th day of September of the current year + /// + public static DateTime The20th + => new(DateTime.Now.Year, 9, 20); + + /// + /// The 21st day of September of the current year + /// + public static DateTime The21st + => new(DateTime.Now.Year, 9, 21); + + /// + /// The 22nd day of September of the current year + /// + public static DateTime The22nd + => new(DateTime.Now.Year, 9, 22); + + /// + /// The 23rd day of September of the current year + /// + public static DateTime The23rd + => new(DateTime.Now.Year, 9, 23); + + /// + /// The 24th day of September of the current year + /// + public static DateTime The24th + => new(DateTime.Now.Year, 9, 24); + + /// + /// The 25th day of September of the current year + /// + public static DateTime The25th + => new(DateTime.Now.Year, 9, 25); + + /// + /// The 26th day of September of the current year + /// + public static DateTime The26th + => new(DateTime.Now.Year, 9, 26); + + /// + /// The 27th day of September of the current year + /// + public static DateTime The27th + => new(DateTime.Now.Year, 9, 27); + + /// + /// The 28th day of September of the current year + /// + public static DateTime The28th + => new(DateTime.Now.Year, 9, 28); + + /// + /// The 29th day of September of the current year + /// + public static DateTime The29th + => new(DateTime.Now.Year, 9, 29); + + /// + /// The 30th day of September of the current year + /// + public static DateTime The30th + => new(DateTime.Now.Year, 9, 30); + } + /// + /// Provides fluent date accessors for October + /// + public class October + { + /// + /// The nth day of October of the current year + /// + public static DateTime The(int dayNumber) + => new(DateTime.Now.Year, 10, dayNumber); + + + /// + /// The 1st day of October of the current year + /// + public static DateTime The1st + => new(DateTime.Now.Year, 10, 1); + + /// + /// The 2nd day of October of the current year + /// + public static DateTime The2nd + => new(DateTime.Now.Year, 10, 2); + + /// + /// The 3rd day of October of the current year + /// + public static DateTime The3rd + => new(DateTime.Now.Year, 10, 3); + + /// + /// The 4th day of October of the current year + /// + public static DateTime The4th + => new(DateTime.Now.Year, 10, 4); + + /// + /// The 5th day of October of the current year + /// + public static DateTime The5th + => new(DateTime.Now.Year, 10, 5); + + /// + /// The 6th day of October of the current year + /// + public static DateTime The6th + => new(DateTime.Now.Year, 10, 6); + + /// + /// The 7th day of October of the current year + /// + public static DateTime The7th + => new(DateTime.Now.Year, 10, 7); + + /// + /// The 8th day of October of the current year + /// + public static DateTime The8th + => new(DateTime.Now.Year, 10, 8); + + /// + /// The 9th day of October of the current year + /// + public static DateTime The9th + => new(DateTime.Now.Year, 10, 9); + + /// + /// The 10th day of October of the current year + /// + public static DateTime The10th + => new(DateTime.Now.Year, 10, 10); + + /// + /// The 11th day of October of the current year + /// + public static DateTime The11th + => new(DateTime.Now.Year, 10, 11); + + /// + /// The 12th day of October of the current year + /// + public static DateTime The12th + => new(DateTime.Now.Year, 10, 12); + + /// + /// The 13th day of October of the current year + /// + public static DateTime The13th + => new(DateTime.Now.Year, 10, 13); + + /// + /// The 14th day of October of the current year + /// + public static DateTime The14th + => new(DateTime.Now.Year, 10, 14); + + /// + /// The 15th day of October of the current year + /// + public static DateTime The15th + => new(DateTime.Now.Year, 10, 15); + + /// + /// The 16th day of October of the current year + /// + public static DateTime The16th + => new(DateTime.Now.Year, 10, 16); + + /// + /// The 17th day of October of the current year + /// + public static DateTime The17th + => new(DateTime.Now.Year, 10, 17); + + /// + /// The 18th day of October of the current year + /// + public static DateTime The18th + => new(DateTime.Now.Year, 10, 18); + + /// + /// The 19th day of October of the current year + /// + public static DateTime The19th + => new(DateTime.Now.Year, 10, 19); + + /// + /// The 20th day of October of the current year + /// + public static DateTime The20th + => new(DateTime.Now.Year, 10, 20); + + /// + /// The 21st day of October of the current year + /// + public static DateTime The21st + => new(DateTime.Now.Year, 10, 21); + + /// + /// The 22nd day of October of the current year + /// + public static DateTime The22nd + => new(DateTime.Now.Year, 10, 22); + + /// + /// The 23rd day of October of the current year + /// + public static DateTime The23rd + => new(DateTime.Now.Year, 10, 23); + + /// + /// The 24th day of October of the current year + /// + public static DateTime The24th + => new(DateTime.Now.Year, 10, 24); + + /// + /// The 25th day of October of the current year + /// + public static DateTime The25th + => new(DateTime.Now.Year, 10, 25); + + /// + /// The 26th day of October of the current year + /// + public static DateTime The26th + => new(DateTime.Now.Year, 10, 26); + + /// + /// The 27th day of October of the current year + /// + public static DateTime The27th + => new(DateTime.Now.Year, 10, 27); + + /// + /// The 28th day of October of the current year + /// + public static DateTime The28th + => new(DateTime.Now.Year, 10, 28); + + /// + /// The 29th day of October of the current year + /// + public static DateTime The29th + => new(DateTime.Now.Year, 10, 29); + + /// + /// The 30th day of October of the current year + /// + public static DateTime The30th + => new(DateTime.Now.Year, 10, 30); + + /// + /// The 31st day of October of the current year + /// + public static DateTime The31st + => new(DateTime.Now.Year, 10, 31); + } + /// + /// Provides fluent date accessors for November + /// + public class November + { + /// + /// The nth day of November of the current year + /// + public static DateTime The(int dayNumber) + => new(DateTime.Now.Year, 11, dayNumber); + + + /// + /// The 1st day of November of the current year + /// + public static DateTime The1st + => new(DateTime.Now.Year, 11, 1); + + /// + /// The 2nd day of November of the current year + /// + public static DateTime The2nd + => new(DateTime.Now.Year, 11, 2); + + /// + /// The 3rd day of November of the current year + /// + public static DateTime The3rd + => new(DateTime.Now.Year, 11, 3); + + /// + /// The 4th day of November of the current year + /// + public static DateTime The4th + => new(DateTime.Now.Year, 11, 4); + + /// + /// The 5th day of November of the current year + /// + public static DateTime The5th + => new(DateTime.Now.Year, 11, 5); + + /// + /// The 6th day of November of the current year + /// + public static DateTime The6th + => new(DateTime.Now.Year, 11, 6); + + /// + /// The 7th day of November of the current year + /// + public static DateTime The7th + => new(DateTime.Now.Year, 11, 7); + + /// + /// The 8th day of November of the current year + /// + public static DateTime The8th + => new(DateTime.Now.Year, 11, 8); + + /// + /// The 9th day of November of the current year + /// + public static DateTime The9th + => new(DateTime.Now.Year, 11, 9); + + /// + /// The 10th day of November of the current year + /// + public static DateTime The10th + => new(DateTime.Now.Year, 11, 10); + + /// + /// The 11th day of November of the current year + /// + public static DateTime The11th + => new(DateTime.Now.Year, 11, 11); + + /// + /// The 12th day of November of the current year + /// + public static DateTime The12th + => new(DateTime.Now.Year, 11, 12); + + /// + /// The 13th day of November of the current year + /// + public static DateTime The13th + => new(DateTime.Now.Year, 11, 13); + + /// + /// The 14th day of November of the current year + /// + public static DateTime The14th + => new(DateTime.Now.Year, 11, 14); + + /// + /// The 15th day of November of the current year + /// + public static DateTime The15th + => new(DateTime.Now.Year, 11, 15); + + /// + /// The 16th day of November of the current year + /// + public static DateTime The16th + => new(DateTime.Now.Year, 11, 16); + + /// + /// The 17th day of November of the current year + /// + public static DateTime The17th + => new(DateTime.Now.Year, 11, 17); + + /// + /// The 18th day of November of the current year + /// + public static DateTime The18th + => new(DateTime.Now.Year, 11, 18); + + /// + /// The 19th day of November of the current year + /// + public static DateTime The19th + => new(DateTime.Now.Year, 11, 19); + + /// + /// The 20th day of November of the current year + /// + public static DateTime The20th + => new(DateTime.Now.Year, 11, 20); + + /// + /// The 21st day of November of the current year + /// + public static DateTime The21st + => new(DateTime.Now.Year, 11, 21); + + /// + /// The 22nd day of November of the current year + /// + public static DateTime The22nd + => new(DateTime.Now.Year, 11, 22); + + /// + /// The 23rd day of November of the current year + /// + public static DateTime The23rd + => new(DateTime.Now.Year, 11, 23); + + /// + /// The 24th day of November of the current year + /// + public static DateTime The24th + => new(DateTime.Now.Year, 11, 24); + + /// + /// The 25th day of November of the current year + /// + public static DateTime The25th + => new(DateTime.Now.Year, 11, 25); + + /// + /// The 26th day of November of the current year + /// + public static DateTime The26th + => new(DateTime.Now.Year, 11, 26); + + /// + /// The 27th day of November of the current year + /// + public static DateTime The27th + => new(DateTime.Now.Year, 11, 27); + + /// + /// The 28th day of November of the current year + /// + public static DateTime The28th + => new(DateTime.Now.Year, 11, 28); + + /// + /// The 29th day of November of the current year + /// + public static DateTime The29th + => new(DateTime.Now.Year, 11, 29); + + /// + /// The 30th day of November of the current year + /// + public static DateTime The30th + => new(DateTime.Now.Year, 11, 30); + } + /// + /// Provides fluent date accessors for December + /// + public class December + { + /// + /// The nth day of December of the current year + /// + public static DateTime The(int dayNumber) + => new(DateTime.Now.Year, 12, dayNumber); + + + /// + /// The 1st day of December of the current year + /// + public static DateTime The1st + => new(DateTime.Now.Year, 12, 1); + + /// + /// The 2nd day of December of the current year + /// + public static DateTime The2nd + => new(DateTime.Now.Year, 12, 2); + + /// + /// The 3rd day of December of the current year + /// + public static DateTime The3rd + => new(DateTime.Now.Year, 12, 3); + + /// + /// The 4th day of December of the current year + /// + public static DateTime The4th + => new(DateTime.Now.Year, 12, 4); + + /// + /// The 5th day of December of the current year + /// + public static DateTime The5th + => new(DateTime.Now.Year, 12, 5); + + /// + /// The 6th day of December of the current year + /// + public static DateTime The6th + => new(DateTime.Now.Year, 12, 6); + + /// + /// The 7th day of December of the current year + /// + public static DateTime The7th + => new(DateTime.Now.Year, 12, 7); + + /// + /// The 8th day of December of the current year + /// + public static DateTime The8th + => new(DateTime.Now.Year, 12, 8); + + /// + /// The 9th day of December of the current year + /// + public static DateTime The9th + => new(DateTime.Now.Year, 12, 9); + + /// + /// The 10th day of December of the current year + /// + public static DateTime The10th + => new(DateTime.Now.Year, 12, 10); + + /// + /// The 11th day of December of the current year + /// + public static DateTime The11th + => new(DateTime.Now.Year, 12, 11); + + /// + /// The 12th day of December of the current year + /// + public static DateTime The12th + => new(DateTime.Now.Year, 12, 12); + + /// + /// The 13th day of December of the current year + /// + public static DateTime The13th + => new(DateTime.Now.Year, 12, 13); + + /// + /// The 14th day of December of the current year + /// + public static DateTime The14th + => new(DateTime.Now.Year, 12, 14); + + /// + /// The 15th day of December of the current year + /// + public static DateTime The15th + => new(DateTime.Now.Year, 12, 15); + + /// + /// The 16th day of December of the current year + /// + public static DateTime The16th + => new(DateTime.Now.Year, 12, 16); + + /// + /// The 17th day of December of the current year + /// + public static DateTime The17th + => new(DateTime.Now.Year, 12, 17); + + /// + /// The 18th day of December of the current year + /// + public static DateTime The18th + => new(DateTime.Now.Year, 12, 18); + + /// + /// The 19th day of December of the current year + /// + public static DateTime The19th + => new(DateTime.Now.Year, 12, 19); + + /// + /// The 20th day of December of the current year + /// + public static DateTime The20th + => new(DateTime.Now.Year, 12, 20); + + /// + /// The 21st day of December of the current year + /// + public static DateTime The21st + => new(DateTime.Now.Year, 12, 21); + + /// + /// The 22nd day of December of the current year + /// + public static DateTime The22nd + => new(DateTime.Now.Year, 12, 22); + + /// + /// The 23rd day of December of the current year + /// + public static DateTime The23rd + => new(DateTime.Now.Year, 12, 23); + + /// + /// The 24th day of December of the current year + /// + public static DateTime The24th + => new(DateTime.Now.Year, 12, 24); + + /// + /// The 25th day of December of the current year + /// + public static DateTime The25th + => new(DateTime.Now.Year, 12, 25); + + /// + /// The 26th day of December of the current year + /// + public static DateTime The26th + => new(DateTime.Now.Year, 12, 26); + + /// + /// The 27th day of December of the current year + /// + public static DateTime The27th + => new(DateTime.Now.Year, 12, 27); + + /// + /// The 28th day of December of the current year + /// + public static DateTime The28th + => new(DateTime.Now.Year, 12, 28); + + /// + /// The 29th day of December of the current year + /// + public static DateTime The29th + => new(DateTime.Now.Year, 12, 29); + + /// + /// The 30th day of December of the current year + /// + public static DateTime The30th + => new(DateTime.Now.Year, 12, 30); + + /// + /// The 31st day of December of the current year + /// + public static DateTime The31st + => new(DateTime.Now.Year, 12, 31); + } +} diff --git a/src/Humanizer/FluentDate/On.Days.tt b/src/Humanizer/FluentDate/On.Days.tt index 56ee0521d..c39c09377 100644 --- a/src/Humanizer/FluentDate/On.Days.tt +++ b/src/Humanizer/FluentDate/On.Days.tt @@ -9,47 +9,42 @@ <#@ import namespace="System.Diagnostics" #> <#@ import namespace="System.Linq" #> <#@ import namespace="System.Collections" #> -<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Collections.Generic" #> using System; -namespace Humanizer +namespace Humanizer; + +/// +/// +public partial class On +{ +<# +const int leapYear = 2012; +for (int month = 1; month <= 12; month++) { + var firstDayOfMonth = new DateTime(leapYear, month, 1); + var monthName = firstDayOfMonth.ToString("MMMM");#> /// + /// Provides fluent date accessors for <#= monthName #> /// - public partial class On + public class <#= monthName #> { - <# - const int leapYear = 2012; - for (int month = 1; month <= 12; month++) + /// + /// The nth day of <#= monthName #> of the current year + /// + public static DateTime The(int dayNumber) + => new(DateTime.Now.Year, <#= month #>, dayNumber); + +<#for (int day = 1; day <= DateTime.DaysInMonth(leapYear, month); day++) { - var firstDayOfMonth = new DateTime(leapYear, month, 1); - var monthName = firstDayOfMonth.ToString("MMMM");#> - + var ordinalDay = day.Ordinalize();#> + /// - /// Provides fluent date accessors for <#= monthName #> + /// The <#= ordinalDay #> day of <#= monthName #> of the current year /// - public class <#= monthName #> - { - /// - /// The nth day of <#= monthName #> of the current year - /// - public static DateTime The(int dayNumber) - { - return new DateTime(DateTime.Now.Year, <#= month #>, dayNumber); - } - <#for (int day = 1; day <= DateTime.DaysInMonth(leapYear, month); day++) - { - var ordinalDay = day.Ordinalize();#> - - /// - /// The <#= ordinalDay #> day of <#= monthName #> of the current year - /// - public static DateTime The<#= ordinalDay #> - { - get { return new DateTime(DateTime.Now.Year, <#= month #>, <#= day #>); } - } - <#}#> + public static DateTime The<#= ordinalDay #> + => new(DateTime.Now.Year, <#= month #>, <#= day #>); +<#}#> + } +<#}#> } - <#}#> - } -} \ No newline at end of file diff --git a/src/Humanizer/FluentDate/OnDate.Days.cs b/src/Humanizer/FluentDate/OnDate.Days.cs index 550d6db79..1aa8b35fe 100644 --- a/src/Humanizer/FluentDate/OnDate.Days.cs +++ b/src/Humanizer/FluentDate/OnDate.Days.cs @@ -1,3111 +1,2341 @@ - - + #if NET6_0_OR_GREATER using System; -namespace Humanizer +namespace Humanizer; + +/// +/// +public partial class OnDate { /// + /// Provides fluent date accessors for January + /// + public class January + { + /// + /// The nth day of January of the current year + /// + public static DateOnly The(int dayNumber) + => new(DateTime.Now.Year, 1, dayNumber); + + /// + /// The 1st day of January of the current year + /// + public static DateOnly The1st + => new(DateTime.Now.Year, 1, 1); + + /// + /// The 2nd day of January of the current year + /// + public static DateOnly The2nd + => new(DateTime.Now.Year, 1, 2); + + /// + /// The 3rd day of January of the current year + /// + public static DateOnly The3rd + => new(DateTime.Now.Year, 1, 3); + + /// + /// The 4th day of January of the current year + /// + public static DateOnly The4th + => new(DateTime.Now.Year, 1, 4); + + /// + /// The 5th day of January of the current year + /// + public static DateOnly The5th + => new(DateTime.Now.Year, 1, 5); + + /// + /// The 6th day of January of the current year + /// + public static DateOnly The6th + => new(DateTime.Now.Year, 1, 6); + + /// + /// The 7th day of January of the current year + /// + public static DateOnly The7th + => new(DateTime.Now.Year, 1, 7); + + /// + /// The 8th day of January of the current year + /// + public static DateOnly The8th + => new(DateTime.Now.Year, 1, 8); + + /// + /// The 9th day of January of the current year + /// + public static DateOnly The9th + => new(DateTime.Now.Year, 1, 9); + + /// + /// The 10th day of January of the current year + /// + public static DateOnly The10th + => new(DateTime.Now.Year, 1, 10); + + /// + /// The 11th day of January of the current year + /// + public static DateOnly The11th + => new(DateTime.Now.Year, 1, 11); + + /// + /// The 12th day of January of the current year + /// + public static DateOnly The12th + => new(DateTime.Now.Year, 1, 12); + + /// + /// The 13th day of January of the current year + /// + public static DateOnly The13th + => new(DateTime.Now.Year, 1, 13); + + /// + /// The 14th day of January of the current year + /// + public static DateOnly The14th + => new(DateTime.Now.Year, 1, 14); + + /// + /// The 15th day of January of the current year + /// + public static DateOnly The15th + => new(DateTime.Now.Year, 1, 15); + + /// + /// The 16th day of January of the current year + /// + public static DateOnly The16th + => new(DateTime.Now.Year, 1, 16); + + /// + /// The 17th day of January of the current year + /// + public static DateOnly The17th + => new(DateTime.Now.Year, 1, 17); + + /// + /// The 18th day of January of the current year + /// + public static DateOnly The18th + => new(DateTime.Now.Year, 1, 18); + + /// + /// The 19th day of January of the current year + /// + public static DateOnly The19th + => new(DateTime.Now.Year, 1, 19); + + /// + /// The 20th day of January of the current year + /// + public static DateOnly The20th + => new(DateTime.Now.Year, 1, 20); + + /// + /// The 21st day of January of the current year + /// + public static DateOnly The21st + => new(DateTime.Now.Year, 1, 21); + + /// + /// The 22nd day of January of the current year + /// + public static DateOnly The22nd + => new(DateTime.Now.Year, 1, 22); + + /// + /// The 23rd day of January of the current year + /// + public static DateOnly The23rd + => new(DateTime.Now.Year, 1, 23); + + /// + /// The 24th day of January of the current year + /// + public static DateOnly The24th + => new(DateTime.Now.Year, 1, 24); + + /// + /// The 25th day of January of the current year + /// + public static DateOnly The25th + => new(DateTime.Now.Year, 1, 25); + + /// + /// The 26th day of January of the current year + /// + public static DateOnly The26th + => new(DateTime.Now.Year, 1, 26); + + /// + /// The 27th day of January of the current year + /// + public static DateOnly The27th + => new(DateTime.Now.Year, 1, 27); + + /// + /// The 28th day of January of the current year + /// + public static DateOnly The28th + => new(DateTime.Now.Year, 1, 28); + + /// + /// The 29th day of January of the current year + /// + public static DateOnly The29th + => new(DateTime.Now.Year, 1, 29); + + /// + /// The 30th day of January of the current year + /// + public static DateOnly The30th + => new(DateTime.Now.Year, 1, 30); + + /// + /// The 31st day of January of the current year + /// + public static DateOnly The31st + => new(DateTime.Now.Year, 1, 31); + } + /// + /// Provides fluent date accessors for February + /// + public class February + { + /// + /// The nth day of February of the current year + /// + public static DateOnly The(int dayNumber) + => new(DateTime.Now.Year, 2, dayNumber); + + /// + /// The 1st day of February of the current year + /// + public static DateOnly The1st + => new(DateTime.Now.Year, 2, 1); + + /// + /// The 2nd day of February of the current year + /// + public static DateOnly The2nd + => new(DateTime.Now.Year, 2, 2); + + /// + /// The 3rd day of February of the current year + /// + public static DateOnly The3rd + => new(DateTime.Now.Year, 2, 3); + + /// + /// The 4th day of February of the current year + /// + public static DateOnly The4th + => new(DateTime.Now.Year, 2, 4); + + /// + /// The 5th day of February of the current year + /// + public static DateOnly The5th + => new(DateTime.Now.Year, 2, 5); + + /// + /// The 6th day of February of the current year + /// + public static DateOnly The6th + => new(DateTime.Now.Year, 2, 6); + + /// + /// The 7th day of February of the current year + /// + public static DateOnly The7th + => new(DateTime.Now.Year, 2, 7); + + /// + /// The 8th day of February of the current year + /// + public static DateOnly The8th + => new(DateTime.Now.Year, 2, 8); + + /// + /// The 9th day of February of the current year + /// + public static DateOnly The9th + => new(DateTime.Now.Year, 2, 9); + + /// + /// The 10th day of February of the current year + /// + public static DateOnly The10th + => new(DateTime.Now.Year, 2, 10); + + /// + /// The 11th day of February of the current year + /// + public static DateOnly The11th + => new(DateTime.Now.Year, 2, 11); + + /// + /// The 12th day of February of the current year + /// + public static DateOnly The12th + => new(DateTime.Now.Year, 2, 12); + + /// + /// The 13th day of February of the current year + /// + public static DateOnly The13th + => new(DateTime.Now.Year, 2, 13); + + /// + /// The 14th day of February of the current year + /// + public static DateOnly The14th + => new(DateTime.Now.Year, 2, 14); + + /// + /// The 15th day of February of the current year + /// + public static DateOnly The15th + => new(DateTime.Now.Year, 2, 15); + + /// + /// The 16th day of February of the current year + /// + public static DateOnly The16th + => new(DateTime.Now.Year, 2, 16); + + /// + /// The 17th day of February of the current year + /// + public static DateOnly The17th + => new(DateTime.Now.Year, 2, 17); + + /// + /// The 18th day of February of the current year + /// + public static DateOnly The18th + => new(DateTime.Now.Year, 2, 18); + + /// + /// The 19th day of February of the current year + /// + public static DateOnly The19th + => new(DateTime.Now.Year, 2, 19); + + /// + /// The 20th day of February of the current year + /// + public static DateOnly The20th + => new(DateTime.Now.Year, 2, 20); + + /// + /// The 21st day of February of the current year + /// + public static DateOnly The21st + => new(DateTime.Now.Year, 2, 21); + + /// + /// The 22nd day of February of the current year + /// + public static DateOnly The22nd + => new(DateTime.Now.Year, 2, 22); + + /// + /// The 23rd day of February of the current year + /// + public static DateOnly The23rd + => new(DateTime.Now.Year, 2, 23); + + /// + /// The 24th day of February of the current year + /// + public static DateOnly The24th + => new(DateTime.Now.Year, 2, 24); + + /// + /// The 25th day of February of the current year + /// + public static DateOnly The25th + => new(DateTime.Now.Year, 2, 25); + + /// + /// The 26th day of February of the current year + /// + public static DateOnly The26th + => new(DateTime.Now.Year, 2, 26); + + /// + /// The 27th day of February of the current year + /// + public static DateOnly The27th + => new(DateTime.Now.Year, 2, 27); + + /// + /// The 28th day of February of the current year + /// + public static DateOnly The28th + => new(DateTime.Now.Year, 2, 28); + + /// + /// The 29th day of February of the current year + /// + public static DateOnly The29th + => new(DateTime.Now.Year, 2, 29); + } + /// + /// Provides fluent date accessors for March /// - public partial class OnDate + public class March { - - /// - /// Provides fluent date accessors for January - /// - public class January - { - /// - /// The nth day of January of the current year - /// - public static DateOnly The(int dayNumber) - { - return new DateOnly(DateTime.Now.Year, 1, dayNumber); - } - - /// - /// The 1st day of January of the current year - /// - public static DateOnly The1st - { - get { return new DateOnly(DateTime.Now.Year, 1, 1); } - } - - /// - /// The 2nd day of January of the current year - /// - public static DateOnly The2nd - { - get { return new DateOnly(DateTime.Now.Year, 1, 2); } - } - - /// - /// The 3rd day of January of the current year - /// - public static DateOnly The3rd - { - get { return new DateOnly(DateTime.Now.Year, 1, 3); } - } - - /// - /// The 4th day of January of the current year - /// - public static DateOnly The4th - { - get { return new DateOnly(DateTime.Now.Year, 1, 4); } - } - - /// - /// The 5th day of January of the current year - /// - public static DateOnly The5th - { - get { return new DateOnly(DateTime.Now.Year, 1, 5); } - } - - /// - /// The 6th day of January of the current year - /// - public static DateOnly The6th - { - get { return new DateOnly(DateTime.Now.Year, 1, 6); } - } - - /// - /// The 7th day of January of the current year - /// - public static DateOnly The7th - { - get { return new DateOnly(DateTime.Now.Year, 1, 7); } - } - - /// - /// The 8th day of January of the current year - /// - public static DateOnly The8th - { - get { return new DateOnly(DateTime.Now.Year, 1, 8); } - } - - /// - /// The 9th day of January of the current year - /// - public static DateOnly The9th - { - get { return new DateOnly(DateTime.Now.Year, 1, 9); } - } - - /// - /// The 10th day of January of the current year - /// - public static DateOnly The10th - { - get { return new DateOnly(DateTime.Now.Year, 1, 10); } - } - - /// - /// The 11th day of January of the current year - /// - public static DateOnly The11th - { - get { return new DateOnly(DateTime.Now.Year, 1, 11); } - } - - /// - /// The 12th day of January of the current year - /// - public static DateOnly The12th - { - get { return new DateOnly(DateTime.Now.Year, 1, 12); } - } - - /// - /// The 13th day of January of the current year - /// - public static DateOnly The13th - { - get { return new DateOnly(DateTime.Now.Year, 1, 13); } - } - - /// - /// The 14th day of January of the current year - /// - public static DateOnly The14th - { - get { return new DateOnly(DateTime.Now.Year, 1, 14); } - } - - /// - /// The 15th day of January of the current year - /// - public static DateOnly The15th - { - get { return new DateOnly(DateTime.Now.Year, 1, 15); } - } - - /// - /// The 16th day of January of the current year - /// - public static DateOnly The16th - { - get { return new DateOnly(DateTime.Now.Year, 1, 16); } - } - - /// - /// The 17th day of January of the current year - /// - public static DateOnly The17th - { - get { return new DateOnly(DateTime.Now.Year, 1, 17); } - } - - /// - /// The 18th day of January of the current year - /// - public static DateOnly The18th - { - get { return new DateOnly(DateTime.Now.Year, 1, 18); } - } - - /// - /// The 19th day of January of the current year - /// - public static DateOnly The19th - { - get { return new DateOnly(DateTime.Now.Year, 1, 19); } - } - - /// - /// The 20th day of January of the current year - /// - public static DateOnly The20th - { - get { return new DateOnly(DateTime.Now.Year, 1, 20); } - } - - /// - /// The 21st day of January of the current year - /// - public static DateOnly The21st - { - get { return new DateOnly(DateTime.Now.Year, 1, 21); } - } - - /// - /// The 22nd day of January of the current year - /// - public static DateOnly The22nd - { - get { return new DateOnly(DateTime.Now.Year, 1, 22); } - } - - /// - /// The 23rd day of January of the current year - /// - public static DateOnly The23rd - { - get { return new DateOnly(DateTime.Now.Year, 1, 23); } - } - - /// - /// The 24th day of January of the current year - /// - public static DateOnly The24th - { - get { return new DateOnly(DateTime.Now.Year, 1, 24); } - } - - /// - /// The 25th day of January of the current year - /// - public static DateOnly The25th - { - get { return new DateOnly(DateTime.Now.Year, 1, 25); } - } - - /// - /// The 26th day of January of the current year - /// - public static DateOnly The26th - { - get { return new DateOnly(DateTime.Now.Year, 1, 26); } - } - - /// - /// The 27th day of January of the current year - /// - public static DateOnly The27th - { - get { return new DateOnly(DateTime.Now.Year, 1, 27); } - } - - /// - /// The 28th day of January of the current year - /// - public static DateOnly The28th - { - get { return new DateOnly(DateTime.Now.Year, 1, 28); } - } - - /// - /// The 29th day of January of the current year - /// - public static DateOnly The29th - { - get { return new DateOnly(DateTime.Now.Year, 1, 29); } - } - - /// - /// The 30th day of January of the current year - /// - public static DateOnly The30th - { - get { return new DateOnly(DateTime.Now.Year, 1, 30); } - } - - /// - /// The 31st day of January of the current year - /// - public static DateOnly The31st - { - get { return new DateOnly(DateTime.Now.Year, 1, 31); } - } - } - - /// - /// Provides fluent date accessors for February - /// - public class February - { - /// - /// The nth day of February of the current year - /// - public static DateOnly The(int dayNumber) - { - return new DateOnly(DateTime.Now.Year, 2, dayNumber); - } - - /// - /// The 1st day of February of the current year - /// - public static DateOnly The1st - { - get { return new DateOnly(DateTime.Now.Year, 2, 1); } - } - - /// - /// The 2nd day of February of the current year - /// - public static DateOnly The2nd - { - get { return new DateOnly(DateTime.Now.Year, 2, 2); } - } - - /// - /// The 3rd day of February of the current year - /// - public static DateOnly The3rd - { - get { return new DateOnly(DateTime.Now.Year, 2, 3); } - } - - /// - /// The 4th day of February of the current year - /// - public static DateOnly The4th - { - get { return new DateOnly(DateTime.Now.Year, 2, 4); } - } - - /// - /// The 5th day of February of the current year - /// - public static DateOnly The5th - { - get { return new DateOnly(DateTime.Now.Year, 2, 5); } - } - - /// - /// The 6th day of February of the current year - /// - public static DateOnly The6th - { - get { return new DateOnly(DateTime.Now.Year, 2, 6); } - } - - /// - /// The 7th day of February of the current year - /// - public static DateOnly The7th - { - get { return new DateOnly(DateTime.Now.Year, 2, 7); } - } - - /// - /// The 8th day of February of the current year - /// - public static DateOnly The8th - { - get { return new DateOnly(DateTime.Now.Year, 2, 8); } - } - - /// - /// The 9th day of February of the current year - /// - public static DateOnly The9th - { - get { return new DateOnly(DateTime.Now.Year, 2, 9); } - } - - /// - /// The 10th day of February of the current year - /// - public static DateOnly The10th - { - get { return new DateOnly(DateTime.Now.Year, 2, 10); } - } - - /// - /// The 11th day of February of the current year - /// - public static DateOnly The11th - { - get { return new DateOnly(DateTime.Now.Year, 2, 11); } - } - - /// - /// The 12th day of February of the current year - /// - public static DateOnly The12th - { - get { return new DateOnly(DateTime.Now.Year, 2, 12); } - } - - /// - /// The 13th day of February of the current year - /// - public static DateOnly The13th - { - get { return new DateOnly(DateTime.Now.Year, 2, 13); } - } - - /// - /// The 14th day of February of the current year - /// - public static DateOnly The14th - { - get { return new DateOnly(DateTime.Now.Year, 2, 14); } - } - - /// - /// The 15th day of February of the current year - /// - public static DateOnly The15th - { - get { return new DateOnly(DateTime.Now.Year, 2, 15); } - } - - /// - /// The 16th day of February of the current year - /// - public static DateOnly The16th - { - get { return new DateOnly(DateTime.Now.Year, 2, 16); } - } - - /// - /// The 17th day of February of the current year - /// - public static DateOnly The17th - { - get { return new DateOnly(DateTime.Now.Year, 2, 17); } - } - - /// - /// The 18th day of February of the current year - /// - public static DateOnly The18th - { - get { return new DateOnly(DateTime.Now.Year, 2, 18); } - } - - /// - /// The 19th day of February of the current year - /// - public static DateOnly The19th - { - get { return new DateOnly(DateTime.Now.Year, 2, 19); } - } - - /// - /// The 20th day of February of the current year - /// - public static DateOnly The20th - { - get { return new DateOnly(DateTime.Now.Year, 2, 20); } - } - - /// - /// The 21st day of February of the current year - /// - public static DateOnly The21st - { - get { return new DateOnly(DateTime.Now.Year, 2, 21); } - } - - /// - /// The 22nd day of February of the current year - /// - public static DateOnly The22nd - { - get { return new DateOnly(DateTime.Now.Year, 2, 22); } - } - - /// - /// The 23rd day of February of the current year - /// - public static DateOnly The23rd - { - get { return new DateOnly(DateTime.Now.Year, 2, 23); } - } - - /// - /// The 24th day of February of the current year - /// - public static DateOnly The24th - { - get { return new DateOnly(DateTime.Now.Year, 2, 24); } - } - - /// - /// The 25th day of February of the current year - /// - public static DateOnly The25th - { - get { return new DateOnly(DateTime.Now.Year, 2, 25); } - } - - /// - /// The 26th day of February of the current year - /// - public static DateOnly The26th - { - get { return new DateOnly(DateTime.Now.Year, 2, 26); } - } - - /// - /// The 27th day of February of the current year - /// - public static DateOnly The27th - { - get { return new DateOnly(DateTime.Now.Year, 2, 27); } - } - - /// - /// The 28th day of February of the current year - /// - public static DateOnly The28th - { - get { return new DateOnly(DateTime.Now.Year, 2, 28); } - } - - /// - /// The 29th day of February of the current year - /// - public static DateOnly The29th - { - get { return new DateOnly(DateTime.Now.Year, 2, 29); } - } - } - - /// - /// Provides fluent date accessors for March - /// - public class March - { - /// - /// The nth day of March of the current year - /// - public static DateOnly The(int dayNumber) - { - return new DateOnly(DateTime.Now.Year, 3, dayNumber); - } - - /// - /// The 1st day of March of the current year - /// - public static DateOnly The1st - { - get { return new DateOnly(DateTime.Now.Year, 3, 1); } - } - - /// - /// The 2nd day of March of the current year - /// - public static DateOnly The2nd - { - get { return new DateOnly(DateTime.Now.Year, 3, 2); } - } - - /// - /// The 3rd day of March of the current year - /// - public static DateOnly The3rd - { - get { return new DateOnly(DateTime.Now.Year, 3, 3); } - } - - /// - /// The 4th day of March of the current year - /// - public static DateOnly The4th - { - get { return new DateOnly(DateTime.Now.Year, 3, 4); } - } - - /// - /// The 5th day of March of the current year - /// - public static DateOnly The5th - { - get { return new DateOnly(DateTime.Now.Year, 3, 5); } - } - - /// - /// The 6th day of March of the current year - /// - public static DateOnly The6th - { - get { return new DateOnly(DateTime.Now.Year, 3, 6); } - } - - /// - /// The 7th day of March of the current year - /// - public static DateOnly The7th - { - get { return new DateOnly(DateTime.Now.Year, 3, 7); } - } - - /// - /// The 8th day of March of the current year - /// - public static DateOnly The8th - { - get { return new DateOnly(DateTime.Now.Year, 3, 8); } - } - - /// - /// The 9th day of March of the current year - /// - public static DateOnly The9th - { - get { return new DateOnly(DateTime.Now.Year, 3, 9); } - } - - /// - /// The 10th day of March of the current year - /// - public static DateOnly The10th - { - get { return new DateOnly(DateTime.Now.Year, 3, 10); } - } - - /// - /// The 11th day of March of the current year - /// - public static DateOnly The11th - { - get { return new DateOnly(DateTime.Now.Year, 3, 11); } - } - - /// - /// The 12th day of March of the current year - /// - public static DateOnly The12th - { - get { return new DateOnly(DateTime.Now.Year, 3, 12); } - } - - /// - /// The 13th day of March of the current year - /// - public static DateOnly The13th - { - get { return new DateOnly(DateTime.Now.Year, 3, 13); } - } - - /// - /// The 14th day of March of the current year - /// - public static DateOnly The14th - { - get { return new DateOnly(DateTime.Now.Year, 3, 14); } - } - - /// - /// The 15th day of March of the current year - /// - public static DateOnly The15th - { - get { return new DateOnly(DateTime.Now.Year, 3, 15); } - } - - /// - /// The 16th day of March of the current year - /// - public static DateOnly The16th - { - get { return new DateOnly(DateTime.Now.Year, 3, 16); } - } - - /// - /// The 17th day of March of the current year - /// - public static DateOnly The17th - { - get { return new DateOnly(DateTime.Now.Year, 3, 17); } - } - - /// - /// The 18th day of March of the current year - /// - public static DateOnly The18th - { - get { return new DateOnly(DateTime.Now.Year, 3, 18); } - } - - /// - /// The 19th day of March of the current year - /// - public static DateOnly The19th - { - get { return new DateOnly(DateTime.Now.Year, 3, 19); } - } - - /// - /// The 20th day of March of the current year - /// - public static DateOnly The20th - { - get { return new DateOnly(DateTime.Now.Year, 3, 20); } - } - - /// - /// The 21st day of March of the current year - /// - public static DateOnly The21st - { - get { return new DateOnly(DateTime.Now.Year, 3, 21); } - } - - /// - /// The 22nd day of March of the current year - /// - public static DateOnly The22nd - { - get { return new DateOnly(DateTime.Now.Year, 3, 22); } - } - - /// - /// The 23rd day of March of the current year - /// - public static DateOnly The23rd - { - get { return new DateOnly(DateTime.Now.Year, 3, 23); } - } - - /// - /// The 24th day of March of the current year - /// - public static DateOnly The24th - { - get { return new DateOnly(DateTime.Now.Year, 3, 24); } - } - - /// - /// The 25th day of March of the current year - /// - public static DateOnly The25th - { - get { return new DateOnly(DateTime.Now.Year, 3, 25); } - } - - /// - /// The 26th day of March of the current year - /// - public static DateOnly The26th - { - get { return new DateOnly(DateTime.Now.Year, 3, 26); } - } - - /// - /// The 27th day of March of the current year - /// - public static DateOnly The27th - { - get { return new DateOnly(DateTime.Now.Year, 3, 27); } - } - - /// - /// The 28th day of March of the current year - /// - public static DateOnly The28th - { - get { return new DateOnly(DateTime.Now.Year, 3, 28); } - } - - /// - /// The 29th day of March of the current year - /// - public static DateOnly The29th - { - get { return new DateOnly(DateTime.Now.Year, 3, 29); } - } - - /// - /// The 30th day of March of the current year - /// - public static DateOnly The30th - { - get { return new DateOnly(DateTime.Now.Year, 3, 30); } - } - - /// - /// The 31st day of March of the current year - /// - public static DateOnly The31st - { - get { return new DateOnly(DateTime.Now.Year, 3, 31); } - } - } - - /// - /// Provides fluent date accessors for April - /// - public class April - { - /// - /// The nth day of April of the current year - /// - public static DateOnly The(int dayNumber) - { - return new DateOnly(DateTime.Now.Year, 4, dayNumber); - } - - /// - /// The 1st day of April of the current year - /// - public static DateOnly The1st - { - get { return new DateOnly(DateTime.Now.Year, 4, 1); } - } - - /// - /// The 2nd day of April of the current year - /// - public static DateOnly The2nd - { - get { return new DateOnly(DateTime.Now.Year, 4, 2); } - } - - /// - /// The 3rd day of April of the current year - /// - public static DateOnly The3rd - { - get { return new DateOnly(DateTime.Now.Year, 4, 3); } - } - - /// - /// The 4th day of April of the current year - /// - public static DateOnly The4th - { - get { return new DateOnly(DateTime.Now.Year, 4, 4); } - } - - /// - /// The 5th day of April of the current year - /// - public static DateOnly The5th - { - get { return new DateOnly(DateTime.Now.Year, 4, 5); } - } - - /// - /// The 6th day of April of the current year - /// - public static DateOnly The6th - { - get { return new DateOnly(DateTime.Now.Year, 4, 6); } - } - - /// - /// The 7th day of April of the current year - /// - public static DateOnly The7th - { - get { return new DateOnly(DateTime.Now.Year, 4, 7); } - } - - /// - /// The 8th day of April of the current year - /// - public static DateOnly The8th - { - get { return new DateOnly(DateTime.Now.Year, 4, 8); } - } - - /// - /// The 9th day of April of the current year - /// - public static DateOnly The9th - { - get { return new DateOnly(DateTime.Now.Year, 4, 9); } - } - - /// - /// The 10th day of April of the current year - /// - public static DateOnly The10th - { - get { return new DateOnly(DateTime.Now.Year, 4, 10); } - } - - /// - /// The 11th day of April of the current year - /// - public static DateOnly The11th - { - get { return new DateOnly(DateTime.Now.Year, 4, 11); } - } - - /// - /// The 12th day of April of the current year - /// - public static DateOnly The12th - { - get { return new DateOnly(DateTime.Now.Year, 4, 12); } - } - - /// - /// The 13th day of April of the current year - /// - public static DateOnly The13th - { - get { return new DateOnly(DateTime.Now.Year, 4, 13); } - } - - /// - /// The 14th day of April of the current year - /// - public static DateOnly The14th - { - get { return new DateOnly(DateTime.Now.Year, 4, 14); } - } - - /// - /// The 15th day of April of the current year - /// - public static DateOnly The15th - { - get { return new DateOnly(DateTime.Now.Year, 4, 15); } - } - - /// - /// The 16th day of April of the current year - /// - public static DateOnly The16th - { - get { return new DateOnly(DateTime.Now.Year, 4, 16); } - } - - /// - /// The 17th day of April of the current year - /// - public static DateOnly The17th - { - get { return new DateOnly(DateTime.Now.Year, 4, 17); } - } - - /// - /// The 18th day of April of the current year - /// - public static DateOnly The18th - { - get { return new DateOnly(DateTime.Now.Year, 4, 18); } - } - - /// - /// The 19th day of April of the current year - /// - public static DateOnly The19th - { - get { return new DateOnly(DateTime.Now.Year, 4, 19); } - } - - /// - /// The 20th day of April of the current year - /// - public static DateOnly The20th - { - get { return new DateOnly(DateTime.Now.Year, 4, 20); } - } - - /// - /// The 21st day of April of the current year - /// - public static DateOnly The21st - { - get { return new DateOnly(DateTime.Now.Year, 4, 21); } - } - - /// - /// The 22nd day of April of the current year - /// - public static DateOnly The22nd - { - get { return new DateOnly(DateTime.Now.Year, 4, 22); } - } - - /// - /// The 23rd day of April of the current year - /// - public static DateOnly The23rd - { - get { return new DateOnly(DateTime.Now.Year, 4, 23); } - } - - /// - /// The 24th day of April of the current year - /// - public static DateOnly The24th - { - get { return new DateOnly(DateTime.Now.Year, 4, 24); } - } - - /// - /// The 25th day of April of the current year - /// - public static DateOnly The25th - { - get { return new DateOnly(DateTime.Now.Year, 4, 25); } - } - - /// - /// The 26th day of April of the current year - /// - public static DateOnly The26th - { - get { return new DateOnly(DateTime.Now.Year, 4, 26); } - } - - /// - /// The 27th day of April of the current year - /// - public static DateOnly The27th - { - get { return new DateOnly(DateTime.Now.Year, 4, 27); } - } - - /// - /// The 28th day of April of the current year - /// - public static DateOnly The28th - { - get { return new DateOnly(DateTime.Now.Year, 4, 28); } - } - - /// - /// The 29th day of April of the current year - /// - public static DateOnly The29th - { - get { return new DateOnly(DateTime.Now.Year, 4, 29); } - } - - /// - /// The 30th day of April of the current year - /// - public static DateOnly The30th - { - get { return new DateOnly(DateTime.Now.Year, 4, 30); } - } - } - - /// - /// Provides fluent date accessors for May - /// - public class May - { - /// - /// The nth day of May of the current year - /// - public static DateOnly The(int dayNumber) - { - return new DateOnly(DateTime.Now.Year, 5, dayNumber); - } - - /// - /// The 1st day of May of the current year - /// - public static DateOnly The1st - { - get { return new DateOnly(DateTime.Now.Year, 5, 1); } - } - - /// - /// The 2nd day of May of the current year - /// - public static DateOnly The2nd - { - get { return new DateOnly(DateTime.Now.Year, 5, 2); } - } - - /// - /// The 3rd day of May of the current year - /// - public static DateOnly The3rd - { - get { return new DateOnly(DateTime.Now.Year, 5, 3); } - } - - /// - /// The 4th day of May of the current year - /// - public static DateOnly The4th - { - get { return new DateOnly(DateTime.Now.Year, 5, 4); } - } - - /// - /// The 5th day of May of the current year - /// - public static DateOnly The5th - { - get { return new DateOnly(DateTime.Now.Year, 5, 5); } - } - - /// - /// The 6th day of May of the current year - /// - public static DateOnly The6th - { - get { return new DateOnly(DateTime.Now.Year, 5, 6); } - } - - /// - /// The 7th day of May of the current year - /// - public static DateOnly The7th - { - get { return new DateOnly(DateTime.Now.Year, 5, 7); } - } - - /// - /// The 8th day of May of the current year - /// - public static DateOnly The8th - { - get { return new DateOnly(DateTime.Now.Year, 5, 8); } - } - - /// - /// The 9th day of May of the current year - /// - public static DateOnly The9th - { - get { return new DateOnly(DateTime.Now.Year, 5, 9); } - } - - /// - /// The 10th day of May of the current year - /// - public static DateOnly The10th - { - get { return new DateOnly(DateTime.Now.Year, 5, 10); } - } - - /// - /// The 11th day of May of the current year - /// - public static DateOnly The11th - { - get { return new DateOnly(DateTime.Now.Year, 5, 11); } - } - - /// - /// The 12th day of May of the current year - /// - public static DateOnly The12th - { - get { return new DateOnly(DateTime.Now.Year, 5, 12); } - } - - /// - /// The 13th day of May of the current year - /// - public static DateOnly The13th - { - get { return new DateOnly(DateTime.Now.Year, 5, 13); } - } - - /// - /// The 14th day of May of the current year - /// - public static DateOnly The14th - { - get { return new DateOnly(DateTime.Now.Year, 5, 14); } - } - - /// - /// The 15th day of May of the current year - /// - public static DateOnly The15th - { - get { return new DateOnly(DateTime.Now.Year, 5, 15); } - } - - /// - /// The 16th day of May of the current year - /// - public static DateOnly The16th - { - get { return new DateOnly(DateTime.Now.Year, 5, 16); } - } - - /// - /// The 17th day of May of the current year - /// - public static DateOnly The17th - { - get { return new DateOnly(DateTime.Now.Year, 5, 17); } - } - - /// - /// The 18th day of May of the current year - /// - public static DateOnly The18th - { - get { return new DateOnly(DateTime.Now.Year, 5, 18); } - } - - /// - /// The 19th day of May of the current year - /// - public static DateOnly The19th - { - get { return new DateOnly(DateTime.Now.Year, 5, 19); } - } - - /// - /// The 20th day of May of the current year - /// - public static DateOnly The20th - { - get { return new DateOnly(DateTime.Now.Year, 5, 20); } - } - - /// - /// The 21st day of May of the current year - /// - public static DateOnly The21st - { - get { return new DateOnly(DateTime.Now.Year, 5, 21); } - } - - /// - /// The 22nd day of May of the current year - /// - public static DateOnly The22nd - { - get { return new DateOnly(DateTime.Now.Year, 5, 22); } - } - - /// - /// The 23rd day of May of the current year - /// - public static DateOnly The23rd - { - get { return new DateOnly(DateTime.Now.Year, 5, 23); } - } - - /// - /// The 24th day of May of the current year - /// - public static DateOnly The24th - { - get { return new DateOnly(DateTime.Now.Year, 5, 24); } - } - - /// - /// The 25th day of May of the current year - /// - public static DateOnly The25th - { - get { return new DateOnly(DateTime.Now.Year, 5, 25); } - } - - /// - /// The 26th day of May of the current year - /// - public static DateOnly The26th - { - get { return new DateOnly(DateTime.Now.Year, 5, 26); } - } - - /// - /// The 27th day of May of the current year - /// - public static DateOnly The27th - { - get { return new DateOnly(DateTime.Now.Year, 5, 27); } - } - - /// - /// The 28th day of May of the current year - /// - public static DateOnly The28th - { - get { return new DateOnly(DateTime.Now.Year, 5, 28); } - } - - /// - /// The 29th day of May of the current year - /// - public static DateOnly The29th - { - get { return new DateOnly(DateTime.Now.Year, 5, 29); } - } - - /// - /// The 30th day of May of the current year - /// - public static DateOnly The30th - { - get { return new DateOnly(DateTime.Now.Year, 5, 30); } - } - - /// - /// The 31st day of May of the current year - /// - public static DateOnly The31st - { - get { return new DateOnly(DateTime.Now.Year, 5, 31); } - } - } - - /// - /// Provides fluent date accessors for June - /// - public class June - { - /// - /// The nth day of June of the current year - /// - public static DateOnly The(int dayNumber) - { - return new DateOnly(DateTime.Now.Year, 6, dayNumber); - } - - /// - /// The 1st day of June of the current year - /// - public static DateOnly The1st - { - get { return new DateOnly(DateTime.Now.Year, 6, 1); } - } - - /// - /// The 2nd day of June of the current year - /// - public static DateOnly The2nd - { - get { return new DateOnly(DateTime.Now.Year, 6, 2); } - } - - /// - /// The 3rd day of June of the current year - /// - public static DateOnly The3rd - { - get { return new DateOnly(DateTime.Now.Year, 6, 3); } - } - - /// - /// The 4th day of June of the current year - /// - public static DateOnly The4th - { - get { return new DateOnly(DateTime.Now.Year, 6, 4); } - } - - /// - /// The 5th day of June of the current year - /// - public static DateOnly The5th - { - get { return new DateOnly(DateTime.Now.Year, 6, 5); } - } - - /// - /// The 6th day of June of the current year - /// - public static DateOnly The6th - { - get { return new DateOnly(DateTime.Now.Year, 6, 6); } - } - - /// - /// The 7th day of June of the current year - /// - public static DateOnly The7th - { - get { return new DateOnly(DateTime.Now.Year, 6, 7); } - } - - /// - /// The 8th day of June of the current year - /// - public static DateOnly The8th - { - get { return new DateOnly(DateTime.Now.Year, 6, 8); } - } - - /// - /// The 9th day of June of the current year - /// - public static DateOnly The9th - { - get { return new DateOnly(DateTime.Now.Year, 6, 9); } - } - - /// - /// The 10th day of June of the current year - /// - public static DateOnly The10th - { - get { return new DateOnly(DateTime.Now.Year, 6, 10); } - } - - /// - /// The 11th day of June of the current year - /// - public static DateOnly The11th - { - get { return new DateOnly(DateTime.Now.Year, 6, 11); } - } - - /// - /// The 12th day of June of the current year - /// - public static DateOnly The12th - { - get { return new DateOnly(DateTime.Now.Year, 6, 12); } - } - - /// - /// The 13th day of June of the current year - /// - public static DateOnly The13th - { - get { return new DateOnly(DateTime.Now.Year, 6, 13); } - } - - /// - /// The 14th day of June of the current year - /// - public static DateOnly The14th - { - get { return new DateOnly(DateTime.Now.Year, 6, 14); } - } - - /// - /// The 15th day of June of the current year - /// - public static DateOnly The15th - { - get { return new DateOnly(DateTime.Now.Year, 6, 15); } - } - - /// - /// The 16th day of June of the current year - /// - public static DateOnly The16th - { - get { return new DateOnly(DateTime.Now.Year, 6, 16); } - } - - /// - /// The 17th day of June of the current year - /// - public static DateOnly The17th - { - get { return new DateOnly(DateTime.Now.Year, 6, 17); } - } - - /// - /// The 18th day of June of the current year - /// - public static DateOnly The18th - { - get { return new DateOnly(DateTime.Now.Year, 6, 18); } - } - - /// - /// The 19th day of June of the current year - /// - public static DateOnly The19th - { - get { return new DateOnly(DateTime.Now.Year, 6, 19); } - } - - /// - /// The 20th day of June of the current year - /// - public static DateOnly The20th - { - get { return new DateOnly(DateTime.Now.Year, 6, 20); } - } - - /// - /// The 21st day of June of the current year - /// - public static DateOnly The21st - { - get { return new DateOnly(DateTime.Now.Year, 6, 21); } - } - - /// - /// The 22nd day of June of the current year - /// - public static DateOnly The22nd - { - get { return new DateOnly(DateTime.Now.Year, 6, 22); } - } - - /// - /// The 23rd day of June of the current year - /// - public static DateOnly The23rd - { - get { return new DateOnly(DateTime.Now.Year, 6, 23); } - } - - /// - /// The 24th day of June of the current year - /// - public static DateOnly The24th - { - get { return new DateOnly(DateTime.Now.Year, 6, 24); } - } - - /// - /// The 25th day of June of the current year - /// - public static DateOnly The25th - { - get { return new DateOnly(DateTime.Now.Year, 6, 25); } - } - - /// - /// The 26th day of June of the current year - /// - public static DateOnly The26th - { - get { return new DateOnly(DateTime.Now.Year, 6, 26); } - } - - /// - /// The 27th day of June of the current year - /// - public static DateOnly The27th - { - get { return new DateOnly(DateTime.Now.Year, 6, 27); } - } - - /// - /// The 28th day of June of the current year - /// - public static DateOnly The28th - { - get { return new DateOnly(DateTime.Now.Year, 6, 28); } - } - - /// - /// The 29th day of June of the current year - /// - public static DateOnly The29th - { - get { return new DateOnly(DateTime.Now.Year, 6, 29); } - } - - /// - /// The 30th day of June of the current year - /// - public static DateOnly The30th - { - get { return new DateOnly(DateTime.Now.Year, 6, 30); } - } - } - - /// - /// Provides fluent date accessors for July - /// - public class July - { - /// - /// The nth day of July of the current year - /// - public static DateOnly The(int dayNumber) - { - return new DateOnly(DateTime.Now.Year, 7, dayNumber); - } - - /// - /// The 1st day of July of the current year - /// - public static DateOnly The1st - { - get { return new DateOnly(DateTime.Now.Year, 7, 1); } - } - - /// - /// The 2nd day of July of the current year - /// - public static DateOnly The2nd - { - get { return new DateOnly(DateTime.Now.Year, 7, 2); } - } - - /// - /// The 3rd day of July of the current year - /// - public static DateOnly The3rd - { - get { return new DateOnly(DateTime.Now.Year, 7, 3); } - } - - /// - /// The 4th day of July of the current year - /// - public static DateOnly The4th - { - get { return new DateOnly(DateTime.Now.Year, 7, 4); } - } - - /// - /// The 5th day of July of the current year - /// - public static DateOnly The5th - { - get { return new DateOnly(DateTime.Now.Year, 7, 5); } - } - - /// - /// The 6th day of July of the current year - /// - public static DateOnly The6th - { - get { return new DateOnly(DateTime.Now.Year, 7, 6); } - } - - /// - /// The 7th day of July of the current year - /// - public static DateOnly The7th - { - get { return new DateOnly(DateTime.Now.Year, 7, 7); } - } - - /// - /// The 8th day of July of the current year - /// - public static DateOnly The8th - { - get { return new DateOnly(DateTime.Now.Year, 7, 8); } - } - - /// - /// The 9th day of July of the current year - /// - public static DateOnly The9th - { - get { return new DateOnly(DateTime.Now.Year, 7, 9); } - } - - /// - /// The 10th day of July of the current year - /// - public static DateOnly The10th - { - get { return new DateOnly(DateTime.Now.Year, 7, 10); } - } - - /// - /// The 11th day of July of the current year - /// - public static DateOnly The11th - { - get { return new DateOnly(DateTime.Now.Year, 7, 11); } - } - - /// - /// The 12th day of July of the current year - /// - public static DateOnly The12th - { - get { return new DateOnly(DateTime.Now.Year, 7, 12); } - } - - /// - /// The 13th day of July of the current year - /// - public static DateOnly The13th - { - get { return new DateOnly(DateTime.Now.Year, 7, 13); } - } - - /// - /// The 14th day of July of the current year - /// - public static DateOnly The14th - { - get { return new DateOnly(DateTime.Now.Year, 7, 14); } - } - - /// - /// The 15th day of July of the current year - /// - public static DateOnly The15th - { - get { return new DateOnly(DateTime.Now.Year, 7, 15); } - } - - /// - /// The 16th day of July of the current year - /// - public static DateOnly The16th - { - get { return new DateOnly(DateTime.Now.Year, 7, 16); } - } - - /// - /// The 17th day of July of the current year - /// - public static DateOnly The17th - { - get { return new DateOnly(DateTime.Now.Year, 7, 17); } - } - - /// - /// The 18th day of July of the current year - /// - public static DateOnly The18th - { - get { return new DateOnly(DateTime.Now.Year, 7, 18); } - } - - /// - /// The 19th day of July of the current year - /// - public static DateOnly The19th - { - get { return new DateOnly(DateTime.Now.Year, 7, 19); } - } - - /// - /// The 20th day of July of the current year - /// - public static DateOnly The20th - { - get { return new DateOnly(DateTime.Now.Year, 7, 20); } - } - - /// - /// The 21st day of July of the current year - /// - public static DateOnly The21st - { - get { return new DateOnly(DateTime.Now.Year, 7, 21); } - } - - /// - /// The 22nd day of July of the current year - /// - public static DateOnly The22nd - { - get { return new DateOnly(DateTime.Now.Year, 7, 22); } - } - - /// - /// The 23rd day of July of the current year - /// - public static DateOnly The23rd - { - get { return new DateOnly(DateTime.Now.Year, 7, 23); } - } - - /// - /// The 24th day of July of the current year - /// - public static DateOnly The24th - { - get { return new DateOnly(DateTime.Now.Year, 7, 24); } - } - - /// - /// The 25th day of July of the current year - /// - public static DateOnly The25th - { - get { return new DateOnly(DateTime.Now.Year, 7, 25); } - } - - /// - /// The 26th day of July of the current year - /// - public static DateOnly The26th - { - get { return new DateOnly(DateTime.Now.Year, 7, 26); } - } - - /// - /// The 27th day of July of the current year - /// - public static DateOnly The27th - { - get { return new DateOnly(DateTime.Now.Year, 7, 27); } - } - - /// - /// The 28th day of July of the current year - /// - public static DateOnly The28th - { - get { return new DateOnly(DateTime.Now.Year, 7, 28); } - } - - /// - /// The 29th day of July of the current year - /// - public static DateOnly The29th - { - get { return new DateOnly(DateTime.Now.Year, 7, 29); } - } - - /// - /// The 30th day of July of the current year - /// - public static DateOnly The30th - { - get { return new DateOnly(DateTime.Now.Year, 7, 30); } - } - - /// - /// The 31st day of July of the current year - /// - public static DateOnly The31st - { - get { return new DateOnly(DateTime.Now.Year, 7, 31); } - } - } - - /// - /// Provides fluent date accessors for August - /// - public class August - { - /// - /// The nth day of August of the current year - /// - public static DateOnly The(int dayNumber) - { - return new DateOnly(DateTime.Now.Year, 8, dayNumber); - } - - /// - /// The 1st day of August of the current year - /// - public static DateOnly The1st - { - get { return new DateOnly(DateTime.Now.Year, 8, 1); } - } - - /// - /// The 2nd day of August of the current year - /// - public static DateOnly The2nd - { - get { return new DateOnly(DateTime.Now.Year, 8, 2); } - } - - /// - /// The 3rd day of August of the current year - /// - public static DateOnly The3rd - { - get { return new DateOnly(DateTime.Now.Year, 8, 3); } - } - - /// - /// The 4th day of August of the current year - /// - public static DateOnly The4th - { - get { return new DateOnly(DateTime.Now.Year, 8, 4); } - } - - /// - /// The 5th day of August of the current year - /// - public static DateOnly The5th - { - get { return new DateOnly(DateTime.Now.Year, 8, 5); } - } - - /// - /// The 6th day of August of the current year - /// - public static DateOnly The6th - { - get { return new DateOnly(DateTime.Now.Year, 8, 6); } - } - - /// - /// The 7th day of August of the current year - /// - public static DateOnly The7th - { - get { return new DateOnly(DateTime.Now.Year, 8, 7); } - } - - /// - /// The 8th day of August of the current year - /// - public static DateOnly The8th - { - get { return new DateOnly(DateTime.Now.Year, 8, 8); } - } - - /// - /// The 9th day of August of the current year - /// - public static DateOnly The9th - { - get { return new DateOnly(DateTime.Now.Year, 8, 9); } - } - - /// - /// The 10th day of August of the current year - /// - public static DateOnly The10th - { - get { return new DateOnly(DateTime.Now.Year, 8, 10); } - } - - /// - /// The 11th day of August of the current year - /// - public static DateOnly The11th - { - get { return new DateOnly(DateTime.Now.Year, 8, 11); } - } - - /// - /// The 12th day of August of the current year - /// - public static DateOnly The12th - { - get { return new DateOnly(DateTime.Now.Year, 8, 12); } - } - - /// - /// The 13th day of August of the current year - /// - public static DateOnly The13th - { - get { return new DateOnly(DateTime.Now.Year, 8, 13); } - } - - /// - /// The 14th day of August of the current year - /// - public static DateOnly The14th - { - get { return new DateOnly(DateTime.Now.Year, 8, 14); } - } - - /// - /// The 15th day of August of the current year - /// - public static DateOnly The15th - { - get { return new DateOnly(DateTime.Now.Year, 8, 15); } - } - - /// - /// The 16th day of August of the current year - /// - public static DateOnly The16th - { - get { return new DateOnly(DateTime.Now.Year, 8, 16); } - } - - /// - /// The 17th day of August of the current year - /// - public static DateOnly The17th - { - get { return new DateOnly(DateTime.Now.Year, 8, 17); } - } - - /// - /// The 18th day of August of the current year - /// - public static DateOnly The18th - { - get { return new DateOnly(DateTime.Now.Year, 8, 18); } - } - - /// - /// The 19th day of August of the current year - /// - public static DateOnly The19th - { - get { return new DateOnly(DateTime.Now.Year, 8, 19); } - } - - /// - /// The 20th day of August of the current year - /// - public static DateOnly The20th - { - get { return new DateOnly(DateTime.Now.Year, 8, 20); } - } - - /// - /// The 21st day of August of the current year - /// - public static DateOnly The21st - { - get { return new DateOnly(DateTime.Now.Year, 8, 21); } - } - - /// - /// The 22nd day of August of the current year - /// - public static DateOnly The22nd - { - get { return new DateOnly(DateTime.Now.Year, 8, 22); } - } - - /// - /// The 23rd day of August of the current year - /// - public static DateOnly The23rd - { - get { return new DateOnly(DateTime.Now.Year, 8, 23); } - } - - /// - /// The 24th day of August of the current year - /// - public static DateOnly The24th - { - get { return new DateOnly(DateTime.Now.Year, 8, 24); } - } - - /// - /// The 25th day of August of the current year - /// - public static DateOnly The25th - { - get { return new DateOnly(DateTime.Now.Year, 8, 25); } - } - - /// - /// The 26th day of August of the current year - /// - public static DateOnly The26th - { - get { return new DateOnly(DateTime.Now.Year, 8, 26); } - } - - /// - /// The 27th day of August of the current year - /// - public static DateOnly The27th - { - get { return new DateOnly(DateTime.Now.Year, 8, 27); } - } - - /// - /// The 28th day of August of the current year - /// - public static DateOnly The28th - { - get { return new DateOnly(DateTime.Now.Year, 8, 28); } - } - - /// - /// The 29th day of August of the current year - /// - public static DateOnly The29th - { - get { return new DateOnly(DateTime.Now.Year, 8, 29); } - } - - /// - /// The 30th day of August of the current year - /// - public static DateOnly The30th - { - get { return new DateOnly(DateTime.Now.Year, 8, 30); } - } - - /// - /// The 31st day of August of the current year - /// - public static DateOnly The31st - { - get { return new DateOnly(DateTime.Now.Year, 8, 31); } - } - } - - /// - /// Provides fluent date accessors for September - /// - public class September - { - /// - /// The nth day of September of the current year - /// - public static DateOnly The(int dayNumber) - { - return new DateOnly(DateTime.Now.Year, 9, dayNumber); - } - - /// - /// The 1st day of September of the current year - /// - public static DateOnly The1st - { - get { return new DateOnly(DateTime.Now.Year, 9, 1); } - } - - /// - /// The 2nd day of September of the current year - /// - public static DateOnly The2nd - { - get { return new DateOnly(DateTime.Now.Year, 9, 2); } - } - - /// - /// The 3rd day of September of the current year - /// - public static DateOnly The3rd - { - get { return new DateOnly(DateTime.Now.Year, 9, 3); } - } - - /// - /// The 4th day of September of the current year - /// - public static DateOnly The4th - { - get { return new DateOnly(DateTime.Now.Year, 9, 4); } - } - - /// - /// The 5th day of September of the current year - /// - public static DateOnly The5th - { - get { return new DateOnly(DateTime.Now.Year, 9, 5); } - } - - /// - /// The 6th day of September of the current year - /// - public static DateOnly The6th - { - get { return new DateOnly(DateTime.Now.Year, 9, 6); } - } - - /// - /// The 7th day of September of the current year - /// - public static DateOnly The7th - { - get { return new DateOnly(DateTime.Now.Year, 9, 7); } - } - - /// - /// The 8th day of September of the current year - /// - public static DateOnly The8th - { - get { return new DateOnly(DateTime.Now.Year, 9, 8); } - } - - /// - /// The 9th day of September of the current year - /// - public static DateOnly The9th - { - get { return new DateOnly(DateTime.Now.Year, 9, 9); } - } - - /// - /// The 10th day of September of the current year - /// - public static DateOnly The10th - { - get { return new DateOnly(DateTime.Now.Year, 9, 10); } - } - - /// - /// The 11th day of September of the current year - /// - public static DateOnly The11th - { - get { return new DateOnly(DateTime.Now.Year, 9, 11); } - } - - /// - /// The 12th day of September of the current year - /// - public static DateOnly The12th - { - get { return new DateOnly(DateTime.Now.Year, 9, 12); } - } - - /// - /// The 13th day of September of the current year - /// - public static DateOnly The13th - { - get { return new DateOnly(DateTime.Now.Year, 9, 13); } - } - - /// - /// The 14th day of September of the current year - /// - public static DateOnly The14th - { - get { return new DateOnly(DateTime.Now.Year, 9, 14); } - } - - /// - /// The 15th day of September of the current year - /// - public static DateOnly The15th - { - get { return new DateOnly(DateTime.Now.Year, 9, 15); } - } - - /// - /// The 16th day of September of the current year - /// - public static DateOnly The16th - { - get { return new DateOnly(DateTime.Now.Year, 9, 16); } - } - - /// - /// The 17th day of September of the current year - /// - public static DateOnly The17th - { - get { return new DateOnly(DateTime.Now.Year, 9, 17); } - } - - /// - /// The 18th day of September of the current year - /// - public static DateOnly The18th - { - get { return new DateOnly(DateTime.Now.Year, 9, 18); } - } - - /// - /// The 19th day of September of the current year - /// - public static DateOnly The19th - { - get { return new DateOnly(DateTime.Now.Year, 9, 19); } - } - - /// - /// The 20th day of September of the current year - /// - public static DateOnly The20th - { - get { return new DateOnly(DateTime.Now.Year, 9, 20); } - } - - /// - /// The 21st day of September of the current year - /// - public static DateOnly The21st - { - get { return new DateOnly(DateTime.Now.Year, 9, 21); } - } - - /// - /// The 22nd day of September of the current year - /// - public static DateOnly The22nd - { - get { return new DateOnly(DateTime.Now.Year, 9, 22); } - } - - /// - /// The 23rd day of September of the current year - /// - public static DateOnly The23rd - { - get { return new DateOnly(DateTime.Now.Year, 9, 23); } - } - - /// - /// The 24th day of September of the current year - /// - public static DateOnly The24th - { - get { return new DateOnly(DateTime.Now.Year, 9, 24); } - } - - /// - /// The 25th day of September of the current year - /// - public static DateOnly The25th - { - get { return new DateOnly(DateTime.Now.Year, 9, 25); } - } - - /// - /// The 26th day of September of the current year - /// - public static DateOnly The26th - { - get { return new DateOnly(DateTime.Now.Year, 9, 26); } - } - - /// - /// The 27th day of September of the current year - /// - public static DateOnly The27th - { - get { return new DateOnly(DateTime.Now.Year, 9, 27); } - } - - /// - /// The 28th day of September of the current year - /// - public static DateOnly The28th - { - get { return new DateOnly(DateTime.Now.Year, 9, 28); } - } - - /// - /// The 29th day of September of the current year - /// - public static DateOnly The29th - { - get { return new DateOnly(DateTime.Now.Year, 9, 29); } - } - - /// - /// The 30th day of September of the current year - /// - public static DateOnly The30th - { - get { return new DateOnly(DateTime.Now.Year, 9, 30); } - } - } - - /// - /// Provides fluent date accessors for October - /// - public class October - { - /// - /// The nth day of October of the current year - /// - public static DateOnly The(int dayNumber) - { - return new DateOnly(DateTime.Now.Year, 10, dayNumber); - } - - /// - /// The 1st day of October of the current year - /// - public static DateOnly The1st - { - get { return new DateOnly(DateTime.Now.Year, 10, 1); } - } - - /// - /// The 2nd day of October of the current year - /// - public static DateOnly The2nd - { - get { return new DateOnly(DateTime.Now.Year, 10, 2); } - } - - /// - /// The 3rd day of October of the current year - /// - public static DateOnly The3rd - { - get { return new DateOnly(DateTime.Now.Year, 10, 3); } - } - - /// - /// The 4th day of October of the current year - /// - public static DateOnly The4th - { - get { return new DateOnly(DateTime.Now.Year, 10, 4); } - } - - /// - /// The 5th day of October of the current year - /// - public static DateOnly The5th - { - get { return new DateOnly(DateTime.Now.Year, 10, 5); } - } - - /// - /// The 6th day of October of the current year - /// - public static DateOnly The6th - { - get { return new DateOnly(DateTime.Now.Year, 10, 6); } - } - - /// - /// The 7th day of October of the current year - /// - public static DateOnly The7th - { - get { return new DateOnly(DateTime.Now.Year, 10, 7); } - } - - /// - /// The 8th day of October of the current year - /// - public static DateOnly The8th - { - get { return new DateOnly(DateTime.Now.Year, 10, 8); } - } - - /// - /// The 9th day of October of the current year - /// - public static DateOnly The9th - { - get { return new DateOnly(DateTime.Now.Year, 10, 9); } - } - - /// - /// The 10th day of October of the current year - /// - public static DateOnly The10th - { - get { return new DateOnly(DateTime.Now.Year, 10, 10); } - } - - /// - /// The 11th day of October of the current year - /// - public static DateOnly The11th - { - get { return new DateOnly(DateTime.Now.Year, 10, 11); } - } - - /// - /// The 12th day of October of the current year - /// - public static DateOnly The12th - { - get { return new DateOnly(DateTime.Now.Year, 10, 12); } - } - - /// - /// The 13th day of October of the current year - /// - public static DateOnly The13th - { - get { return new DateOnly(DateTime.Now.Year, 10, 13); } - } - - /// - /// The 14th day of October of the current year - /// - public static DateOnly The14th - { - get { return new DateOnly(DateTime.Now.Year, 10, 14); } - } - - /// - /// The 15th day of October of the current year - /// - public static DateOnly The15th - { - get { return new DateOnly(DateTime.Now.Year, 10, 15); } - } - - /// - /// The 16th day of October of the current year - /// - public static DateOnly The16th - { - get { return new DateOnly(DateTime.Now.Year, 10, 16); } - } - - /// - /// The 17th day of October of the current year - /// - public static DateOnly The17th - { - get { return new DateOnly(DateTime.Now.Year, 10, 17); } - } - - /// - /// The 18th day of October of the current year - /// - public static DateOnly The18th - { - get { return new DateOnly(DateTime.Now.Year, 10, 18); } - } - - /// - /// The 19th day of October of the current year - /// - public static DateOnly The19th - { - get { return new DateOnly(DateTime.Now.Year, 10, 19); } - } - - /// - /// The 20th day of October of the current year - /// - public static DateOnly The20th - { - get { return new DateOnly(DateTime.Now.Year, 10, 20); } - } - - /// - /// The 21st day of October of the current year - /// - public static DateOnly The21st - { - get { return new DateOnly(DateTime.Now.Year, 10, 21); } - } - - /// - /// The 22nd day of October of the current year - /// - public static DateOnly The22nd - { - get { return new DateOnly(DateTime.Now.Year, 10, 22); } - } - - /// - /// The 23rd day of October of the current year - /// - public static DateOnly The23rd - { - get { return new DateOnly(DateTime.Now.Year, 10, 23); } - } - - /// - /// The 24th day of October of the current year - /// - public static DateOnly The24th - { - get { return new DateOnly(DateTime.Now.Year, 10, 24); } - } - - /// - /// The 25th day of October of the current year - /// - public static DateOnly The25th - { - get { return new DateOnly(DateTime.Now.Year, 10, 25); } - } - - /// - /// The 26th day of October of the current year - /// - public static DateOnly The26th - { - get { return new DateOnly(DateTime.Now.Year, 10, 26); } - } - - /// - /// The 27th day of October of the current year - /// - public static DateOnly The27th - { - get { return new DateOnly(DateTime.Now.Year, 10, 27); } - } - - /// - /// The 28th day of October of the current year - /// - public static DateOnly The28th - { - get { return new DateOnly(DateTime.Now.Year, 10, 28); } - } - - /// - /// The 29th day of October of the current year - /// - public static DateOnly The29th - { - get { return new DateOnly(DateTime.Now.Year, 10, 29); } - } - - /// - /// The 30th day of October of the current year - /// - public static DateOnly The30th - { - get { return new DateOnly(DateTime.Now.Year, 10, 30); } - } - - /// - /// The 31st day of October of the current year - /// - public static DateOnly The31st - { - get { return new DateOnly(DateTime.Now.Year, 10, 31); } - } - } - - /// - /// Provides fluent date accessors for November - /// - public class November - { - /// - /// The nth day of November of the current year - /// - public static DateOnly The(int dayNumber) - { - return new DateOnly(DateTime.Now.Year, 11, dayNumber); - } - - /// - /// The 1st day of November of the current year - /// - public static DateOnly The1st - { - get { return new DateOnly(DateTime.Now.Year, 11, 1); } - } - - /// - /// The 2nd day of November of the current year - /// - public static DateOnly The2nd - { - get { return new DateOnly(DateTime.Now.Year, 11, 2); } - } - - /// - /// The 3rd day of November of the current year - /// - public static DateOnly The3rd - { - get { return new DateOnly(DateTime.Now.Year, 11, 3); } - } - - /// - /// The 4th day of November of the current year - /// - public static DateOnly The4th - { - get { return new DateOnly(DateTime.Now.Year, 11, 4); } - } - - /// - /// The 5th day of November of the current year - /// - public static DateOnly The5th - { - get { return new DateOnly(DateTime.Now.Year, 11, 5); } - } - - /// - /// The 6th day of November of the current year - /// - public static DateOnly The6th - { - get { return new DateOnly(DateTime.Now.Year, 11, 6); } - } - - /// - /// The 7th day of November of the current year - /// - public static DateOnly The7th - { - get { return new DateOnly(DateTime.Now.Year, 11, 7); } - } - - /// - /// The 8th day of November of the current year - /// - public static DateOnly The8th - { - get { return new DateOnly(DateTime.Now.Year, 11, 8); } - } - - /// - /// The 9th day of November of the current year - /// - public static DateOnly The9th - { - get { return new DateOnly(DateTime.Now.Year, 11, 9); } - } - - /// - /// The 10th day of November of the current year - /// - public static DateOnly The10th - { - get { return new DateOnly(DateTime.Now.Year, 11, 10); } - } - - /// - /// The 11th day of November of the current year - /// - public static DateOnly The11th - { - get { return new DateOnly(DateTime.Now.Year, 11, 11); } - } - - /// - /// The 12th day of November of the current year - /// - public static DateOnly The12th - { - get { return new DateOnly(DateTime.Now.Year, 11, 12); } - } - - /// - /// The 13th day of November of the current year - /// - public static DateOnly The13th - { - get { return new DateOnly(DateTime.Now.Year, 11, 13); } - } - - /// - /// The 14th day of November of the current year - /// - public static DateOnly The14th - { - get { return new DateOnly(DateTime.Now.Year, 11, 14); } - } - - /// - /// The 15th day of November of the current year - /// - public static DateOnly The15th - { - get { return new DateOnly(DateTime.Now.Year, 11, 15); } - } - - /// - /// The 16th day of November of the current year - /// - public static DateOnly The16th - { - get { return new DateOnly(DateTime.Now.Year, 11, 16); } - } - - /// - /// The 17th day of November of the current year - /// - public static DateOnly The17th - { - get { return new DateOnly(DateTime.Now.Year, 11, 17); } - } - - /// - /// The 18th day of November of the current year - /// - public static DateOnly The18th - { - get { return new DateOnly(DateTime.Now.Year, 11, 18); } - } - - /// - /// The 19th day of November of the current year - /// - public static DateOnly The19th - { - get { return new DateOnly(DateTime.Now.Year, 11, 19); } - } - - /// - /// The 20th day of November of the current year - /// - public static DateOnly The20th - { - get { return new DateOnly(DateTime.Now.Year, 11, 20); } - } - - /// - /// The 21st day of November of the current year - /// - public static DateOnly The21st - { - get { return new DateOnly(DateTime.Now.Year, 11, 21); } - } - - /// - /// The 22nd day of November of the current year - /// - public static DateOnly The22nd - { - get { return new DateOnly(DateTime.Now.Year, 11, 22); } - } - - /// - /// The 23rd day of November of the current year - /// - public static DateOnly The23rd - { - get { return new DateOnly(DateTime.Now.Year, 11, 23); } - } - - /// - /// The 24th day of November of the current year - /// - public static DateOnly The24th - { - get { return new DateOnly(DateTime.Now.Year, 11, 24); } - } - - /// - /// The 25th day of November of the current year - /// - public static DateOnly The25th - { - get { return new DateOnly(DateTime.Now.Year, 11, 25); } - } - - /// - /// The 26th day of November of the current year - /// - public static DateOnly The26th - { - get { return new DateOnly(DateTime.Now.Year, 11, 26); } - } - - /// - /// The 27th day of November of the current year - /// - public static DateOnly The27th - { - get { return new DateOnly(DateTime.Now.Year, 11, 27); } - } - - /// - /// The 28th day of November of the current year - /// - public static DateOnly The28th - { - get { return new DateOnly(DateTime.Now.Year, 11, 28); } - } - - /// - /// The 29th day of November of the current year - /// - public static DateOnly The29th - { - get { return new DateOnly(DateTime.Now.Year, 11, 29); } - } - - /// - /// The 30th day of November of the current year - /// - public static DateOnly The30th - { - get { return new DateOnly(DateTime.Now.Year, 11, 30); } - } - } - - /// - /// Provides fluent date accessors for December - /// - public class December - { - /// - /// The nth day of December of the current year - /// - public static DateOnly The(int dayNumber) - { - return new DateOnly(DateTime.Now.Year, 12, dayNumber); - } - - /// - /// The 1st day of December of the current year - /// - public static DateOnly The1st - { - get { return new DateOnly(DateTime.Now.Year, 12, 1); } - } - - /// - /// The 2nd day of December of the current year - /// - public static DateOnly The2nd - { - get { return new DateOnly(DateTime.Now.Year, 12, 2); } - } - - /// - /// The 3rd day of December of the current year - /// - public static DateOnly The3rd - { - get { return new DateOnly(DateTime.Now.Year, 12, 3); } - } - - /// - /// The 4th day of December of the current year - /// - public static DateOnly The4th - { - get { return new DateOnly(DateTime.Now.Year, 12, 4); } - } - - /// - /// The 5th day of December of the current year - /// - public static DateOnly The5th - { - get { return new DateOnly(DateTime.Now.Year, 12, 5); } - } - - /// - /// The 6th day of December of the current year - /// - public static DateOnly The6th - { - get { return new DateOnly(DateTime.Now.Year, 12, 6); } - } - - /// - /// The 7th day of December of the current year - /// - public static DateOnly The7th - { - get { return new DateOnly(DateTime.Now.Year, 12, 7); } - } - - /// - /// The 8th day of December of the current year - /// - public static DateOnly The8th - { - get { return new DateOnly(DateTime.Now.Year, 12, 8); } - } - - /// - /// The 9th day of December of the current year - /// - public static DateOnly The9th - { - get { return new DateOnly(DateTime.Now.Year, 12, 9); } - } - - /// - /// The 10th day of December of the current year - /// - public static DateOnly The10th - { - get { return new DateOnly(DateTime.Now.Year, 12, 10); } - } - - /// - /// The 11th day of December of the current year - /// - public static DateOnly The11th - { - get { return new DateOnly(DateTime.Now.Year, 12, 11); } - } - - /// - /// The 12th day of December of the current year - /// - public static DateOnly The12th - { - get { return new DateOnly(DateTime.Now.Year, 12, 12); } - } - - /// - /// The 13th day of December of the current year - /// - public static DateOnly The13th - { - get { return new DateOnly(DateTime.Now.Year, 12, 13); } - } - - /// - /// The 14th day of December of the current year - /// - public static DateOnly The14th - { - get { return new DateOnly(DateTime.Now.Year, 12, 14); } - } - - /// - /// The 15th day of December of the current year - /// - public static DateOnly The15th - { - get { return new DateOnly(DateTime.Now.Year, 12, 15); } - } - - /// - /// The 16th day of December of the current year - /// - public static DateOnly The16th - { - get { return new DateOnly(DateTime.Now.Year, 12, 16); } - } - - /// - /// The 17th day of December of the current year - /// - public static DateOnly The17th - { - get { return new DateOnly(DateTime.Now.Year, 12, 17); } - } - - /// - /// The 18th day of December of the current year - /// - public static DateOnly The18th - { - get { return new DateOnly(DateTime.Now.Year, 12, 18); } - } - - /// - /// The 19th day of December of the current year - /// - public static DateOnly The19th - { - get { return new DateOnly(DateTime.Now.Year, 12, 19); } - } - - /// - /// The 20th day of December of the current year - /// - public static DateOnly The20th - { - get { return new DateOnly(DateTime.Now.Year, 12, 20); } - } - - /// - /// The 21st day of December of the current year - /// - public static DateOnly The21st - { - get { return new DateOnly(DateTime.Now.Year, 12, 21); } - } - - /// - /// The 22nd day of December of the current year - /// - public static DateOnly The22nd - { - get { return new DateOnly(DateTime.Now.Year, 12, 22); } - } - - /// - /// The 23rd day of December of the current year - /// - public static DateOnly The23rd - { - get { return new DateOnly(DateTime.Now.Year, 12, 23); } - } - - /// - /// The 24th day of December of the current year - /// - public static DateOnly The24th - { - get { return new DateOnly(DateTime.Now.Year, 12, 24); } - } - - /// - /// The 25th day of December of the current year - /// - public static DateOnly The25th - { - get { return new DateOnly(DateTime.Now.Year, 12, 25); } - } - - /// - /// The 26th day of December of the current year - /// - public static DateOnly The26th - { - get { return new DateOnly(DateTime.Now.Year, 12, 26); } - } - - /// - /// The 27th day of December of the current year - /// - public static DateOnly The27th - { - get { return new DateOnly(DateTime.Now.Year, 12, 27); } - } - - /// - /// The 28th day of December of the current year - /// - public static DateOnly The28th - { - get { return new DateOnly(DateTime.Now.Year, 12, 28); } - } - - /// - /// The 29th day of December of the current year - /// - public static DateOnly The29th - { - get { return new DateOnly(DateTime.Now.Year, 12, 29); } - } - - /// - /// The 30th day of December of the current year - /// - public static DateOnly The30th - { - get { return new DateOnly(DateTime.Now.Year, 12, 30); } - } - - /// - /// The 31st day of December of the current year - /// - public static DateOnly The31st - { - get { return new DateOnly(DateTime.Now.Year, 12, 31); } - } - } - } + /// + /// The nth day of March of the current year + /// + public static DateOnly The(int dayNumber) + => new(DateTime.Now.Year, 3, dayNumber); + + /// + /// The 1st day of March of the current year + /// + public static DateOnly The1st + => new(DateTime.Now.Year, 3, 1); + + /// + /// The 2nd day of March of the current year + /// + public static DateOnly The2nd + => new(DateTime.Now.Year, 3, 2); + + /// + /// The 3rd day of March of the current year + /// + public static DateOnly The3rd + => new(DateTime.Now.Year, 3, 3); + + /// + /// The 4th day of March of the current year + /// + public static DateOnly The4th + => new(DateTime.Now.Year, 3, 4); + + /// + /// The 5th day of March of the current year + /// + public static DateOnly The5th + => new(DateTime.Now.Year, 3, 5); + + /// + /// The 6th day of March of the current year + /// + public static DateOnly The6th + => new(DateTime.Now.Year, 3, 6); + + /// + /// The 7th day of March of the current year + /// + public static DateOnly The7th + => new(DateTime.Now.Year, 3, 7); + + /// + /// The 8th day of March of the current year + /// + public static DateOnly The8th + => new(DateTime.Now.Year, 3, 8); + + /// + /// The 9th day of March of the current year + /// + public static DateOnly The9th + => new(DateTime.Now.Year, 3, 9); + + /// + /// The 10th day of March of the current year + /// + public static DateOnly The10th + => new(DateTime.Now.Year, 3, 10); + + /// + /// The 11th day of March of the current year + /// + public static DateOnly The11th + => new(DateTime.Now.Year, 3, 11); + + /// + /// The 12th day of March of the current year + /// + public static DateOnly The12th + => new(DateTime.Now.Year, 3, 12); + + /// + /// The 13th day of March of the current year + /// + public static DateOnly The13th + => new(DateTime.Now.Year, 3, 13); + + /// + /// The 14th day of March of the current year + /// + public static DateOnly The14th + => new(DateTime.Now.Year, 3, 14); + + /// + /// The 15th day of March of the current year + /// + public static DateOnly The15th + => new(DateTime.Now.Year, 3, 15); + + /// + /// The 16th day of March of the current year + /// + public static DateOnly The16th + => new(DateTime.Now.Year, 3, 16); + + /// + /// The 17th day of March of the current year + /// + public static DateOnly The17th + => new(DateTime.Now.Year, 3, 17); + + /// + /// The 18th day of March of the current year + /// + public static DateOnly The18th + => new(DateTime.Now.Year, 3, 18); + + /// + /// The 19th day of March of the current year + /// + public static DateOnly The19th + => new(DateTime.Now.Year, 3, 19); + + /// + /// The 20th day of March of the current year + /// + public static DateOnly The20th + => new(DateTime.Now.Year, 3, 20); + + /// + /// The 21st day of March of the current year + /// + public static DateOnly The21st + => new(DateTime.Now.Year, 3, 21); + + /// + /// The 22nd day of March of the current year + /// + public static DateOnly The22nd + => new(DateTime.Now.Year, 3, 22); + + /// + /// The 23rd day of March of the current year + /// + public static DateOnly The23rd + => new(DateTime.Now.Year, 3, 23); + + /// + /// The 24th day of March of the current year + /// + public static DateOnly The24th + => new(DateTime.Now.Year, 3, 24); + + /// + /// The 25th day of March of the current year + /// + public static DateOnly The25th + => new(DateTime.Now.Year, 3, 25); + + /// + /// The 26th day of March of the current year + /// + public static DateOnly The26th + => new(DateTime.Now.Year, 3, 26); + + /// + /// The 27th day of March of the current year + /// + public static DateOnly The27th + => new(DateTime.Now.Year, 3, 27); + + /// + /// The 28th day of March of the current year + /// + public static DateOnly The28th + => new(DateTime.Now.Year, 3, 28); + + /// + /// The 29th day of March of the current year + /// + public static DateOnly The29th + => new(DateTime.Now.Year, 3, 29); + + /// + /// The 30th day of March of the current year + /// + public static DateOnly The30th + => new(DateTime.Now.Year, 3, 30); + + /// + /// The 31st day of March of the current year + /// + public static DateOnly The31st + => new(DateTime.Now.Year, 3, 31); + } + /// + /// Provides fluent date accessors for April + /// + public class April + { + /// + /// The nth day of April of the current year + /// + public static DateOnly The(int dayNumber) + => new(DateTime.Now.Year, 4, dayNumber); + + /// + /// The 1st day of April of the current year + /// + public static DateOnly The1st + => new(DateTime.Now.Year, 4, 1); + + /// + /// The 2nd day of April of the current year + /// + public static DateOnly The2nd + => new(DateTime.Now.Year, 4, 2); + + /// + /// The 3rd day of April of the current year + /// + public static DateOnly The3rd + => new(DateTime.Now.Year, 4, 3); + + /// + /// The 4th day of April of the current year + /// + public static DateOnly The4th + => new(DateTime.Now.Year, 4, 4); + + /// + /// The 5th day of April of the current year + /// + public static DateOnly The5th + => new(DateTime.Now.Year, 4, 5); + + /// + /// The 6th day of April of the current year + /// + public static DateOnly The6th + => new(DateTime.Now.Year, 4, 6); + + /// + /// The 7th day of April of the current year + /// + public static DateOnly The7th + => new(DateTime.Now.Year, 4, 7); + + /// + /// The 8th day of April of the current year + /// + public static DateOnly The8th + => new(DateTime.Now.Year, 4, 8); + + /// + /// The 9th day of April of the current year + /// + public static DateOnly The9th + => new(DateTime.Now.Year, 4, 9); + + /// + /// The 10th day of April of the current year + /// + public static DateOnly The10th + => new(DateTime.Now.Year, 4, 10); + + /// + /// The 11th day of April of the current year + /// + public static DateOnly The11th + => new(DateTime.Now.Year, 4, 11); + + /// + /// The 12th day of April of the current year + /// + public static DateOnly The12th + => new(DateTime.Now.Year, 4, 12); + + /// + /// The 13th day of April of the current year + /// + public static DateOnly The13th + => new(DateTime.Now.Year, 4, 13); + + /// + /// The 14th day of April of the current year + /// + public static DateOnly The14th + => new(DateTime.Now.Year, 4, 14); + + /// + /// The 15th day of April of the current year + /// + public static DateOnly The15th + => new(DateTime.Now.Year, 4, 15); + + /// + /// The 16th day of April of the current year + /// + public static DateOnly The16th + => new(DateTime.Now.Year, 4, 16); + + /// + /// The 17th day of April of the current year + /// + public static DateOnly The17th + => new(DateTime.Now.Year, 4, 17); + + /// + /// The 18th day of April of the current year + /// + public static DateOnly The18th + => new(DateTime.Now.Year, 4, 18); + + /// + /// The 19th day of April of the current year + /// + public static DateOnly The19th + => new(DateTime.Now.Year, 4, 19); + + /// + /// The 20th day of April of the current year + /// + public static DateOnly The20th + => new(DateTime.Now.Year, 4, 20); + + /// + /// The 21st day of April of the current year + /// + public static DateOnly The21st + => new(DateTime.Now.Year, 4, 21); + + /// + /// The 22nd day of April of the current year + /// + public static DateOnly The22nd + => new(DateTime.Now.Year, 4, 22); + + /// + /// The 23rd day of April of the current year + /// + public static DateOnly The23rd + => new(DateTime.Now.Year, 4, 23); + + /// + /// The 24th day of April of the current year + /// + public static DateOnly The24th + => new(DateTime.Now.Year, 4, 24); + + /// + /// The 25th day of April of the current year + /// + public static DateOnly The25th + => new(DateTime.Now.Year, 4, 25); + + /// + /// The 26th day of April of the current year + /// + public static DateOnly The26th + => new(DateTime.Now.Year, 4, 26); + + /// + /// The 27th day of April of the current year + /// + public static DateOnly The27th + => new(DateTime.Now.Year, 4, 27); + + /// + /// The 28th day of April of the current year + /// + public static DateOnly The28th + => new(DateTime.Now.Year, 4, 28); + + /// + /// The 29th day of April of the current year + /// + public static DateOnly The29th + => new(DateTime.Now.Year, 4, 29); + + /// + /// The 30th day of April of the current year + /// + public static DateOnly The30th + => new(DateTime.Now.Year, 4, 30); + } + /// + /// Provides fluent date accessors for May + /// + public class May + { + /// + /// The nth day of May of the current year + /// + public static DateOnly The(int dayNumber) + => new(DateTime.Now.Year, 5, dayNumber); + + /// + /// The 1st day of May of the current year + /// + public static DateOnly The1st + => new(DateTime.Now.Year, 5, 1); + + /// + /// The 2nd day of May of the current year + /// + public static DateOnly The2nd + => new(DateTime.Now.Year, 5, 2); + + /// + /// The 3rd day of May of the current year + /// + public static DateOnly The3rd + => new(DateTime.Now.Year, 5, 3); + + /// + /// The 4th day of May of the current year + /// + public static DateOnly The4th + => new(DateTime.Now.Year, 5, 4); + + /// + /// The 5th day of May of the current year + /// + public static DateOnly The5th + => new(DateTime.Now.Year, 5, 5); + + /// + /// The 6th day of May of the current year + /// + public static DateOnly The6th + => new(DateTime.Now.Year, 5, 6); + + /// + /// The 7th day of May of the current year + /// + public static DateOnly The7th + => new(DateTime.Now.Year, 5, 7); + + /// + /// The 8th day of May of the current year + /// + public static DateOnly The8th + => new(DateTime.Now.Year, 5, 8); + + /// + /// The 9th day of May of the current year + /// + public static DateOnly The9th + => new(DateTime.Now.Year, 5, 9); + + /// + /// The 10th day of May of the current year + /// + public static DateOnly The10th + => new(DateTime.Now.Year, 5, 10); + + /// + /// The 11th day of May of the current year + /// + public static DateOnly The11th + => new(DateTime.Now.Year, 5, 11); + + /// + /// The 12th day of May of the current year + /// + public static DateOnly The12th + => new(DateTime.Now.Year, 5, 12); + + /// + /// The 13th day of May of the current year + /// + public static DateOnly The13th + => new(DateTime.Now.Year, 5, 13); + + /// + /// The 14th day of May of the current year + /// + public static DateOnly The14th + => new(DateTime.Now.Year, 5, 14); + + /// + /// The 15th day of May of the current year + /// + public static DateOnly The15th + => new(DateTime.Now.Year, 5, 15); + + /// + /// The 16th day of May of the current year + /// + public static DateOnly The16th + => new(DateTime.Now.Year, 5, 16); + + /// + /// The 17th day of May of the current year + /// + public static DateOnly The17th + => new(DateTime.Now.Year, 5, 17); + + /// + /// The 18th day of May of the current year + /// + public static DateOnly The18th + => new(DateTime.Now.Year, 5, 18); + + /// + /// The 19th day of May of the current year + /// + public static DateOnly The19th + => new(DateTime.Now.Year, 5, 19); + + /// + /// The 20th day of May of the current year + /// + public static DateOnly The20th + => new(DateTime.Now.Year, 5, 20); + + /// + /// The 21st day of May of the current year + /// + public static DateOnly The21st + => new(DateTime.Now.Year, 5, 21); + + /// + /// The 22nd day of May of the current year + /// + public static DateOnly The22nd + => new(DateTime.Now.Year, 5, 22); + + /// + /// The 23rd day of May of the current year + /// + public static DateOnly The23rd + => new(DateTime.Now.Year, 5, 23); + + /// + /// The 24th day of May of the current year + /// + public static DateOnly The24th + => new(DateTime.Now.Year, 5, 24); + + /// + /// The 25th day of May of the current year + /// + public static DateOnly The25th + => new(DateTime.Now.Year, 5, 25); + + /// + /// The 26th day of May of the current year + /// + public static DateOnly The26th + => new(DateTime.Now.Year, 5, 26); + + /// + /// The 27th day of May of the current year + /// + public static DateOnly The27th + => new(DateTime.Now.Year, 5, 27); + + /// + /// The 28th day of May of the current year + /// + public static DateOnly The28th + => new(DateTime.Now.Year, 5, 28); + + /// + /// The 29th day of May of the current year + /// + public static DateOnly The29th + => new(DateTime.Now.Year, 5, 29); + + /// + /// The 30th day of May of the current year + /// + public static DateOnly The30th + => new(DateTime.Now.Year, 5, 30); + + /// + /// The 31st day of May of the current year + /// + public static DateOnly The31st + => new(DateTime.Now.Year, 5, 31); + } + /// + /// Provides fluent date accessors for June + /// + public class June + { + /// + /// The nth day of June of the current year + /// + public static DateOnly The(int dayNumber) + => new(DateTime.Now.Year, 6, dayNumber); + + /// + /// The 1st day of June of the current year + /// + public static DateOnly The1st + => new(DateTime.Now.Year, 6, 1); + + /// + /// The 2nd day of June of the current year + /// + public static DateOnly The2nd + => new(DateTime.Now.Year, 6, 2); + + /// + /// The 3rd day of June of the current year + /// + public static DateOnly The3rd + => new(DateTime.Now.Year, 6, 3); + + /// + /// The 4th day of June of the current year + /// + public static DateOnly The4th + => new(DateTime.Now.Year, 6, 4); + + /// + /// The 5th day of June of the current year + /// + public static DateOnly The5th + => new(DateTime.Now.Year, 6, 5); + + /// + /// The 6th day of June of the current year + /// + public static DateOnly The6th + => new(DateTime.Now.Year, 6, 6); + + /// + /// The 7th day of June of the current year + /// + public static DateOnly The7th + => new(DateTime.Now.Year, 6, 7); + + /// + /// The 8th day of June of the current year + /// + public static DateOnly The8th + => new(DateTime.Now.Year, 6, 8); + + /// + /// The 9th day of June of the current year + /// + public static DateOnly The9th + => new(DateTime.Now.Year, 6, 9); + + /// + /// The 10th day of June of the current year + /// + public static DateOnly The10th + => new(DateTime.Now.Year, 6, 10); + + /// + /// The 11th day of June of the current year + /// + public static DateOnly The11th + => new(DateTime.Now.Year, 6, 11); + + /// + /// The 12th day of June of the current year + /// + public static DateOnly The12th + => new(DateTime.Now.Year, 6, 12); + + /// + /// The 13th day of June of the current year + /// + public static DateOnly The13th + => new(DateTime.Now.Year, 6, 13); + + /// + /// The 14th day of June of the current year + /// + public static DateOnly The14th + => new(DateTime.Now.Year, 6, 14); + + /// + /// The 15th day of June of the current year + /// + public static DateOnly The15th + => new(DateTime.Now.Year, 6, 15); + + /// + /// The 16th day of June of the current year + /// + public static DateOnly The16th + => new(DateTime.Now.Year, 6, 16); + + /// + /// The 17th day of June of the current year + /// + public static DateOnly The17th + => new(DateTime.Now.Year, 6, 17); + + /// + /// The 18th day of June of the current year + /// + public static DateOnly The18th + => new(DateTime.Now.Year, 6, 18); + + /// + /// The 19th day of June of the current year + /// + public static DateOnly The19th + => new(DateTime.Now.Year, 6, 19); + + /// + /// The 20th day of June of the current year + /// + public static DateOnly The20th + => new(DateTime.Now.Year, 6, 20); + + /// + /// The 21st day of June of the current year + /// + public static DateOnly The21st + => new(DateTime.Now.Year, 6, 21); + + /// + /// The 22nd day of June of the current year + /// + public static DateOnly The22nd + => new(DateTime.Now.Year, 6, 22); + + /// + /// The 23rd day of June of the current year + /// + public static DateOnly The23rd + => new(DateTime.Now.Year, 6, 23); + + /// + /// The 24th day of June of the current year + /// + public static DateOnly The24th + => new(DateTime.Now.Year, 6, 24); + + /// + /// The 25th day of June of the current year + /// + public static DateOnly The25th + => new(DateTime.Now.Year, 6, 25); + + /// + /// The 26th day of June of the current year + /// + public static DateOnly The26th + => new(DateTime.Now.Year, 6, 26); + + /// + /// The 27th day of June of the current year + /// + public static DateOnly The27th + => new(DateTime.Now.Year, 6, 27); + + /// + /// The 28th day of June of the current year + /// + public static DateOnly The28th + => new(DateTime.Now.Year, 6, 28); + + /// + /// The 29th day of June of the current year + /// + public static DateOnly The29th + => new(DateTime.Now.Year, 6, 29); + + /// + /// The 30th day of June of the current year + /// + public static DateOnly The30th + => new(DateTime.Now.Year, 6, 30); + } + /// + /// Provides fluent date accessors for July + /// + public class July + { + /// + /// The nth day of July of the current year + /// + public static DateOnly The(int dayNumber) + => new(DateTime.Now.Year, 7, dayNumber); + + /// + /// The 1st day of July of the current year + /// + public static DateOnly The1st + => new(DateTime.Now.Year, 7, 1); + + /// + /// The 2nd day of July of the current year + /// + public static DateOnly The2nd + => new(DateTime.Now.Year, 7, 2); + + /// + /// The 3rd day of July of the current year + /// + public static DateOnly The3rd + => new(DateTime.Now.Year, 7, 3); + + /// + /// The 4th day of July of the current year + /// + public static DateOnly The4th + => new(DateTime.Now.Year, 7, 4); + + /// + /// The 5th day of July of the current year + /// + public static DateOnly The5th + => new(DateTime.Now.Year, 7, 5); + + /// + /// The 6th day of July of the current year + /// + public static DateOnly The6th + => new(DateTime.Now.Year, 7, 6); + + /// + /// The 7th day of July of the current year + /// + public static DateOnly The7th + => new(DateTime.Now.Year, 7, 7); + + /// + /// The 8th day of July of the current year + /// + public static DateOnly The8th + => new(DateTime.Now.Year, 7, 8); + + /// + /// The 9th day of July of the current year + /// + public static DateOnly The9th + => new(DateTime.Now.Year, 7, 9); + + /// + /// The 10th day of July of the current year + /// + public static DateOnly The10th + => new(DateTime.Now.Year, 7, 10); + + /// + /// The 11th day of July of the current year + /// + public static DateOnly The11th + => new(DateTime.Now.Year, 7, 11); + + /// + /// The 12th day of July of the current year + /// + public static DateOnly The12th + => new(DateTime.Now.Year, 7, 12); + + /// + /// The 13th day of July of the current year + /// + public static DateOnly The13th + => new(DateTime.Now.Year, 7, 13); + + /// + /// The 14th day of July of the current year + /// + public static DateOnly The14th + => new(DateTime.Now.Year, 7, 14); + + /// + /// The 15th day of July of the current year + /// + public static DateOnly The15th + => new(DateTime.Now.Year, 7, 15); + + /// + /// The 16th day of July of the current year + /// + public static DateOnly The16th + => new(DateTime.Now.Year, 7, 16); + + /// + /// The 17th day of July of the current year + /// + public static DateOnly The17th + => new(DateTime.Now.Year, 7, 17); + + /// + /// The 18th day of July of the current year + /// + public static DateOnly The18th + => new(DateTime.Now.Year, 7, 18); + + /// + /// The 19th day of July of the current year + /// + public static DateOnly The19th + => new(DateTime.Now.Year, 7, 19); + + /// + /// The 20th day of July of the current year + /// + public static DateOnly The20th + => new(DateTime.Now.Year, 7, 20); + + /// + /// The 21st day of July of the current year + /// + public static DateOnly The21st + => new(DateTime.Now.Year, 7, 21); + + /// + /// The 22nd day of July of the current year + /// + public static DateOnly The22nd + => new(DateTime.Now.Year, 7, 22); + + /// + /// The 23rd day of July of the current year + /// + public static DateOnly The23rd + => new(DateTime.Now.Year, 7, 23); + + /// + /// The 24th day of July of the current year + /// + public static DateOnly The24th + => new(DateTime.Now.Year, 7, 24); + + /// + /// The 25th day of July of the current year + /// + public static DateOnly The25th + => new(DateTime.Now.Year, 7, 25); + + /// + /// The 26th day of July of the current year + /// + public static DateOnly The26th + => new(DateTime.Now.Year, 7, 26); + + /// + /// The 27th day of July of the current year + /// + public static DateOnly The27th + => new(DateTime.Now.Year, 7, 27); + + /// + /// The 28th day of July of the current year + /// + public static DateOnly The28th + => new(DateTime.Now.Year, 7, 28); + + /// + /// The 29th day of July of the current year + /// + public static DateOnly The29th + => new(DateTime.Now.Year, 7, 29); + + /// + /// The 30th day of July of the current year + /// + public static DateOnly The30th + => new(DateTime.Now.Year, 7, 30); + + /// + /// The 31st day of July of the current year + /// + public static DateOnly The31st + => new(DateTime.Now.Year, 7, 31); + } + /// + /// Provides fluent date accessors for August + /// + public class August + { + /// + /// The nth day of August of the current year + /// + public static DateOnly The(int dayNumber) + => new(DateTime.Now.Year, 8, dayNumber); + + /// + /// The 1st day of August of the current year + /// + public static DateOnly The1st + => new(DateTime.Now.Year, 8, 1); + + /// + /// The 2nd day of August of the current year + /// + public static DateOnly The2nd + => new(DateTime.Now.Year, 8, 2); + + /// + /// The 3rd day of August of the current year + /// + public static DateOnly The3rd + => new(DateTime.Now.Year, 8, 3); + + /// + /// The 4th day of August of the current year + /// + public static DateOnly The4th + => new(DateTime.Now.Year, 8, 4); + + /// + /// The 5th day of August of the current year + /// + public static DateOnly The5th + => new(DateTime.Now.Year, 8, 5); + + /// + /// The 6th day of August of the current year + /// + public static DateOnly The6th + => new(DateTime.Now.Year, 8, 6); + + /// + /// The 7th day of August of the current year + /// + public static DateOnly The7th + => new(DateTime.Now.Year, 8, 7); + + /// + /// The 8th day of August of the current year + /// + public static DateOnly The8th + => new(DateTime.Now.Year, 8, 8); + + /// + /// The 9th day of August of the current year + /// + public static DateOnly The9th + => new(DateTime.Now.Year, 8, 9); + + /// + /// The 10th day of August of the current year + /// + public static DateOnly The10th + => new(DateTime.Now.Year, 8, 10); + + /// + /// The 11th day of August of the current year + /// + public static DateOnly The11th + => new(DateTime.Now.Year, 8, 11); + + /// + /// The 12th day of August of the current year + /// + public static DateOnly The12th + => new(DateTime.Now.Year, 8, 12); + + /// + /// The 13th day of August of the current year + /// + public static DateOnly The13th + => new(DateTime.Now.Year, 8, 13); + + /// + /// The 14th day of August of the current year + /// + public static DateOnly The14th + => new(DateTime.Now.Year, 8, 14); + + /// + /// The 15th day of August of the current year + /// + public static DateOnly The15th + => new(DateTime.Now.Year, 8, 15); + + /// + /// The 16th day of August of the current year + /// + public static DateOnly The16th + => new(DateTime.Now.Year, 8, 16); + + /// + /// The 17th day of August of the current year + /// + public static DateOnly The17th + => new(DateTime.Now.Year, 8, 17); + + /// + /// The 18th day of August of the current year + /// + public static DateOnly The18th + => new(DateTime.Now.Year, 8, 18); + + /// + /// The 19th day of August of the current year + /// + public static DateOnly The19th + => new(DateTime.Now.Year, 8, 19); + + /// + /// The 20th day of August of the current year + /// + public static DateOnly The20th + => new(DateTime.Now.Year, 8, 20); + + /// + /// The 21st day of August of the current year + /// + public static DateOnly The21st + => new(DateTime.Now.Year, 8, 21); + + /// + /// The 22nd day of August of the current year + /// + public static DateOnly The22nd + => new(DateTime.Now.Year, 8, 22); + + /// + /// The 23rd day of August of the current year + /// + public static DateOnly The23rd + => new(DateTime.Now.Year, 8, 23); + + /// + /// The 24th day of August of the current year + /// + public static DateOnly The24th + => new(DateTime.Now.Year, 8, 24); + + /// + /// The 25th day of August of the current year + /// + public static DateOnly The25th + => new(DateTime.Now.Year, 8, 25); + + /// + /// The 26th day of August of the current year + /// + public static DateOnly The26th + => new(DateTime.Now.Year, 8, 26); + + /// + /// The 27th day of August of the current year + /// + public static DateOnly The27th + => new(DateTime.Now.Year, 8, 27); + + /// + /// The 28th day of August of the current year + /// + public static DateOnly The28th + => new(DateTime.Now.Year, 8, 28); + + /// + /// The 29th day of August of the current year + /// + public static DateOnly The29th + => new(DateTime.Now.Year, 8, 29); + + /// + /// The 30th day of August of the current year + /// + public static DateOnly The30th + => new(DateTime.Now.Year, 8, 30); + + /// + /// The 31st day of August of the current year + /// + public static DateOnly The31st + => new(DateTime.Now.Year, 8, 31); + } + /// + /// Provides fluent date accessors for September + /// + public class September + { + /// + /// The nth day of September of the current year + /// + public static DateOnly The(int dayNumber) + => new(DateTime.Now.Year, 9, dayNumber); + + /// + /// The 1st day of September of the current year + /// + public static DateOnly The1st + => new(DateTime.Now.Year, 9, 1); + + /// + /// The 2nd day of September of the current year + /// + public static DateOnly The2nd + => new(DateTime.Now.Year, 9, 2); + + /// + /// The 3rd day of September of the current year + /// + public static DateOnly The3rd + => new(DateTime.Now.Year, 9, 3); + + /// + /// The 4th day of September of the current year + /// + public static DateOnly The4th + => new(DateTime.Now.Year, 9, 4); + + /// + /// The 5th day of September of the current year + /// + public static DateOnly The5th + => new(DateTime.Now.Year, 9, 5); + + /// + /// The 6th day of September of the current year + /// + public static DateOnly The6th + => new(DateTime.Now.Year, 9, 6); + + /// + /// The 7th day of September of the current year + /// + public static DateOnly The7th + => new(DateTime.Now.Year, 9, 7); + + /// + /// The 8th day of September of the current year + /// + public static DateOnly The8th + => new(DateTime.Now.Year, 9, 8); + + /// + /// The 9th day of September of the current year + /// + public static DateOnly The9th + => new(DateTime.Now.Year, 9, 9); + + /// + /// The 10th day of September of the current year + /// + public static DateOnly The10th + => new(DateTime.Now.Year, 9, 10); + + /// + /// The 11th day of September of the current year + /// + public static DateOnly The11th + => new(DateTime.Now.Year, 9, 11); + + /// + /// The 12th day of September of the current year + /// + public static DateOnly The12th + => new(DateTime.Now.Year, 9, 12); + + /// + /// The 13th day of September of the current year + /// + public static DateOnly The13th + => new(DateTime.Now.Year, 9, 13); + + /// + /// The 14th day of September of the current year + /// + public static DateOnly The14th + => new(DateTime.Now.Year, 9, 14); + + /// + /// The 15th day of September of the current year + /// + public static DateOnly The15th + => new(DateTime.Now.Year, 9, 15); + + /// + /// The 16th day of September of the current year + /// + public static DateOnly The16th + => new(DateTime.Now.Year, 9, 16); + + /// + /// The 17th day of September of the current year + /// + public static DateOnly The17th + => new(DateTime.Now.Year, 9, 17); + + /// + /// The 18th day of September of the current year + /// + public static DateOnly The18th + => new(DateTime.Now.Year, 9, 18); + + /// + /// The 19th day of September of the current year + /// + public static DateOnly The19th + => new(DateTime.Now.Year, 9, 19); + + /// + /// The 20th day of September of the current year + /// + public static DateOnly The20th + => new(DateTime.Now.Year, 9, 20); + + /// + /// The 21st day of September of the current year + /// + public static DateOnly The21st + => new(DateTime.Now.Year, 9, 21); + + /// + /// The 22nd day of September of the current year + /// + public static DateOnly The22nd + => new(DateTime.Now.Year, 9, 22); + + /// + /// The 23rd day of September of the current year + /// + public static DateOnly The23rd + => new(DateTime.Now.Year, 9, 23); + + /// + /// The 24th day of September of the current year + /// + public static DateOnly The24th + => new(DateTime.Now.Year, 9, 24); + + /// + /// The 25th day of September of the current year + /// + public static DateOnly The25th + => new(DateTime.Now.Year, 9, 25); + + /// + /// The 26th day of September of the current year + /// + public static DateOnly The26th + => new(DateTime.Now.Year, 9, 26); + + /// + /// The 27th day of September of the current year + /// + public static DateOnly The27th + => new(DateTime.Now.Year, 9, 27); + + /// + /// The 28th day of September of the current year + /// + public static DateOnly The28th + => new(DateTime.Now.Year, 9, 28); + + /// + /// The 29th day of September of the current year + /// + public static DateOnly The29th + => new(DateTime.Now.Year, 9, 29); + + /// + /// The 30th day of September of the current year + /// + public static DateOnly The30th + => new(DateTime.Now.Year, 9, 30); + } + /// + /// Provides fluent date accessors for October + /// + public class October + { + /// + /// The nth day of October of the current year + /// + public static DateOnly The(int dayNumber) + => new(DateTime.Now.Year, 10, dayNumber); + + /// + /// The 1st day of October of the current year + /// + public static DateOnly The1st + => new(DateTime.Now.Year, 10, 1); + + /// + /// The 2nd day of October of the current year + /// + public static DateOnly The2nd + => new(DateTime.Now.Year, 10, 2); + + /// + /// The 3rd day of October of the current year + /// + public static DateOnly The3rd + => new(DateTime.Now.Year, 10, 3); + + /// + /// The 4th day of October of the current year + /// + public static DateOnly The4th + => new(DateTime.Now.Year, 10, 4); + + /// + /// The 5th day of October of the current year + /// + public static DateOnly The5th + => new(DateTime.Now.Year, 10, 5); + + /// + /// The 6th day of October of the current year + /// + public static DateOnly The6th + => new(DateTime.Now.Year, 10, 6); + + /// + /// The 7th day of October of the current year + /// + public static DateOnly The7th + => new(DateTime.Now.Year, 10, 7); + + /// + /// The 8th day of October of the current year + /// + public static DateOnly The8th + => new(DateTime.Now.Year, 10, 8); + + /// + /// The 9th day of October of the current year + /// + public static DateOnly The9th + => new(DateTime.Now.Year, 10, 9); + + /// + /// The 10th day of October of the current year + /// + public static DateOnly The10th + => new(DateTime.Now.Year, 10, 10); + + /// + /// The 11th day of October of the current year + /// + public static DateOnly The11th + => new(DateTime.Now.Year, 10, 11); + + /// + /// The 12th day of October of the current year + /// + public static DateOnly The12th + => new(DateTime.Now.Year, 10, 12); + + /// + /// The 13th day of October of the current year + /// + public static DateOnly The13th + => new(DateTime.Now.Year, 10, 13); + + /// + /// The 14th day of October of the current year + /// + public static DateOnly The14th + => new(DateTime.Now.Year, 10, 14); + + /// + /// The 15th day of October of the current year + /// + public static DateOnly The15th + => new(DateTime.Now.Year, 10, 15); + + /// + /// The 16th day of October of the current year + /// + public static DateOnly The16th + => new(DateTime.Now.Year, 10, 16); + + /// + /// The 17th day of October of the current year + /// + public static DateOnly The17th + => new(DateTime.Now.Year, 10, 17); + + /// + /// The 18th day of October of the current year + /// + public static DateOnly The18th + => new(DateTime.Now.Year, 10, 18); + + /// + /// The 19th day of October of the current year + /// + public static DateOnly The19th + => new(DateTime.Now.Year, 10, 19); + + /// + /// The 20th day of October of the current year + /// + public static DateOnly The20th + => new(DateTime.Now.Year, 10, 20); + + /// + /// The 21st day of October of the current year + /// + public static DateOnly The21st + => new(DateTime.Now.Year, 10, 21); + + /// + /// The 22nd day of October of the current year + /// + public static DateOnly The22nd + => new(DateTime.Now.Year, 10, 22); + + /// + /// The 23rd day of October of the current year + /// + public static DateOnly The23rd + => new(DateTime.Now.Year, 10, 23); + + /// + /// The 24th day of October of the current year + /// + public static DateOnly The24th + => new(DateTime.Now.Year, 10, 24); + + /// + /// The 25th day of October of the current year + /// + public static DateOnly The25th + => new(DateTime.Now.Year, 10, 25); + + /// + /// The 26th day of October of the current year + /// + public static DateOnly The26th + => new(DateTime.Now.Year, 10, 26); + + /// + /// The 27th day of October of the current year + /// + public static DateOnly The27th + => new(DateTime.Now.Year, 10, 27); + + /// + /// The 28th day of October of the current year + /// + public static DateOnly The28th + => new(DateTime.Now.Year, 10, 28); + + /// + /// The 29th day of October of the current year + /// + public static DateOnly The29th + => new(DateTime.Now.Year, 10, 29); + + /// + /// The 30th day of October of the current year + /// + public static DateOnly The30th + => new(DateTime.Now.Year, 10, 30); + + /// + /// The 31st day of October of the current year + /// + public static DateOnly The31st + => new(DateTime.Now.Year, 10, 31); + } + /// + /// Provides fluent date accessors for November + /// + public class November + { + /// + /// The nth day of November of the current year + /// + public static DateOnly The(int dayNumber) + => new(DateTime.Now.Year, 11, dayNumber); + + /// + /// The 1st day of November of the current year + /// + public static DateOnly The1st + => new(DateTime.Now.Year, 11, 1); + + /// + /// The 2nd day of November of the current year + /// + public static DateOnly The2nd + => new(DateTime.Now.Year, 11, 2); + + /// + /// The 3rd day of November of the current year + /// + public static DateOnly The3rd + => new(DateTime.Now.Year, 11, 3); + + /// + /// The 4th day of November of the current year + /// + public static DateOnly The4th + => new(DateTime.Now.Year, 11, 4); + + /// + /// The 5th day of November of the current year + /// + public static DateOnly The5th + => new(DateTime.Now.Year, 11, 5); + + /// + /// The 6th day of November of the current year + /// + public static DateOnly The6th + => new(DateTime.Now.Year, 11, 6); + + /// + /// The 7th day of November of the current year + /// + public static DateOnly The7th + => new(DateTime.Now.Year, 11, 7); + + /// + /// The 8th day of November of the current year + /// + public static DateOnly The8th + => new(DateTime.Now.Year, 11, 8); + + /// + /// The 9th day of November of the current year + /// + public static DateOnly The9th + => new(DateTime.Now.Year, 11, 9); + + /// + /// The 10th day of November of the current year + /// + public static DateOnly The10th + => new(DateTime.Now.Year, 11, 10); + + /// + /// The 11th day of November of the current year + /// + public static DateOnly The11th + => new(DateTime.Now.Year, 11, 11); + + /// + /// The 12th day of November of the current year + /// + public static DateOnly The12th + => new(DateTime.Now.Year, 11, 12); + + /// + /// The 13th day of November of the current year + /// + public static DateOnly The13th + => new(DateTime.Now.Year, 11, 13); + + /// + /// The 14th day of November of the current year + /// + public static DateOnly The14th + => new(DateTime.Now.Year, 11, 14); + + /// + /// The 15th day of November of the current year + /// + public static DateOnly The15th + => new(DateTime.Now.Year, 11, 15); + + /// + /// The 16th day of November of the current year + /// + public static DateOnly The16th + => new(DateTime.Now.Year, 11, 16); + + /// + /// The 17th day of November of the current year + /// + public static DateOnly The17th + => new(DateTime.Now.Year, 11, 17); + + /// + /// The 18th day of November of the current year + /// + public static DateOnly The18th + => new(DateTime.Now.Year, 11, 18); + + /// + /// The 19th day of November of the current year + /// + public static DateOnly The19th + => new(DateTime.Now.Year, 11, 19); + + /// + /// The 20th day of November of the current year + /// + public static DateOnly The20th + => new(DateTime.Now.Year, 11, 20); + + /// + /// The 21st day of November of the current year + /// + public static DateOnly The21st + => new(DateTime.Now.Year, 11, 21); + + /// + /// The 22nd day of November of the current year + /// + public static DateOnly The22nd + => new(DateTime.Now.Year, 11, 22); + + /// + /// The 23rd day of November of the current year + /// + public static DateOnly The23rd + => new(DateTime.Now.Year, 11, 23); + + /// + /// The 24th day of November of the current year + /// + public static DateOnly The24th + => new(DateTime.Now.Year, 11, 24); + + /// + /// The 25th day of November of the current year + /// + public static DateOnly The25th + => new(DateTime.Now.Year, 11, 25); + + /// + /// The 26th day of November of the current year + /// + public static DateOnly The26th + => new(DateTime.Now.Year, 11, 26); + + /// + /// The 27th day of November of the current year + /// + public static DateOnly The27th + => new(DateTime.Now.Year, 11, 27); + + /// + /// The 28th day of November of the current year + /// + public static DateOnly The28th + => new(DateTime.Now.Year, 11, 28); + + /// + /// The 29th day of November of the current year + /// + public static DateOnly The29th + => new(DateTime.Now.Year, 11, 29); + + /// + /// The 30th day of November of the current year + /// + public static DateOnly The30th + => new(DateTime.Now.Year, 11, 30); + } + /// + /// Provides fluent date accessors for December + /// + public class December + { + /// + /// The nth day of December of the current year + /// + public static DateOnly The(int dayNumber) + => new(DateTime.Now.Year, 12, dayNumber); + + /// + /// The 1st day of December of the current year + /// + public static DateOnly The1st + => new(DateTime.Now.Year, 12, 1); + + /// + /// The 2nd day of December of the current year + /// + public static DateOnly The2nd + => new(DateTime.Now.Year, 12, 2); + + /// + /// The 3rd day of December of the current year + /// + public static DateOnly The3rd + => new(DateTime.Now.Year, 12, 3); + + /// + /// The 4th day of December of the current year + /// + public static DateOnly The4th + => new(DateTime.Now.Year, 12, 4); + + /// + /// The 5th day of December of the current year + /// + public static DateOnly The5th + => new(DateTime.Now.Year, 12, 5); + + /// + /// The 6th day of December of the current year + /// + public static DateOnly The6th + => new(DateTime.Now.Year, 12, 6); + + /// + /// The 7th day of December of the current year + /// + public static DateOnly The7th + => new(DateTime.Now.Year, 12, 7); + + /// + /// The 8th day of December of the current year + /// + public static DateOnly The8th + => new(DateTime.Now.Year, 12, 8); + + /// + /// The 9th day of December of the current year + /// + public static DateOnly The9th + => new(DateTime.Now.Year, 12, 9); + + /// + /// The 10th day of December of the current year + /// + public static DateOnly The10th + => new(DateTime.Now.Year, 12, 10); + + /// + /// The 11th day of December of the current year + /// + public static DateOnly The11th + => new(DateTime.Now.Year, 12, 11); + + /// + /// The 12th day of December of the current year + /// + public static DateOnly The12th + => new(DateTime.Now.Year, 12, 12); + + /// + /// The 13th day of December of the current year + /// + public static DateOnly The13th + => new(DateTime.Now.Year, 12, 13); + + /// + /// The 14th day of December of the current year + /// + public static DateOnly The14th + => new(DateTime.Now.Year, 12, 14); + + /// + /// The 15th day of December of the current year + /// + public static DateOnly The15th + => new(DateTime.Now.Year, 12, 15); + + /// + /// The 16th day of December of the current year + /// + public static DateOnly The16th + => new(DateTime.Now.Year, 12, 16); + + /// + /// The 17th day of December of the current year + /// + public static DateOnly The17th + => new(DateTime.Now.Year, 12, 17); + + /// + /// The 18th day of December of the current year + /// + public static DateOnly The18th + => new(DateTime.Now.Year, 12, 18); + + /// + /// The 19th day of December of the current year + /// + public static DateOnly The19th + => new(DateTime.Now.Year, 12, 19); + + /// + /// The 20th day of December of the current year + /// + public static DateOnly The20th + => new(DateTime.Now.Year, 12, 20); + + /// + /// The 21st day of December of the current year + /// + public static DateOnly The21st + => new(DateTime.Now.Year, 12, 21); + + /// + /// The 22nd day of December of the current year + /// + public static DateOnly The22nd + => new(DateTime.Now.Year, 12, 22); + + /// + /// The 23rd day of December of the current year + /// + public static DateOnly The23rd + => new(DateTime.Now.Year, 12, 23); + + /// + /// The 24th day of December of the current year + /// + public static DateOnly The24th + => new(DateTime.Now.Year, 12, 24); + + /// + /// The 25th day of December of the current year + /// + public static DateOnly The25th + => new(DateTime.Now.Year, 12, 25); + + /// + /// The 26th day of December of the current year + /// + public static DateOnly The26th + => new(DateTime.Now.Year, 12, 26); + + /// + /// The 27th day of December of the current year + /// + public static DateOnly The27th + => new(DateTime.Now.Year, 12, 27); + + /// + /// The 28th day of December of the current year + /// + public static DateOnly The28th + => new(DateTime.Now.Year, 12, 28); + + /// + /// The 29th day of December of the current year + /// + public static DateOnly The29th + => new(DateTime.Now.Year, 12, 29); + + /// + /// The 30th day of December of the current year + /// + public static DateOnly The30th + => new(DateTime.Now.Year, 12, 30); + + /// + /// The 31st day of December of the current year + /// + public static DateOnly The31st + => new(DateTime.Now.Year, 12, 31); + } } #endif \ No newline at end of file diff --git a/src/Humanizer/FluentDate/OnDate.Days.tt b/src/Humanizer/FluentDate/OnDate.Days.tt index 22619e3e3..73fff8e54 100644 --- a/src/Humanizer/FluentDate/OnDate.Days.tt +++ b/src/Humanizer/FluentDate/OnDate.Days.tt @@ -9,51 +9,45 @@ <#@ import namespace="System.Diagnostics" #> <#@ import namespace="System.Linq" #> <#@ import namespace="System.Collections" #> -<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Collections.Generic" #> #if NET6_0_OR_GREATER using System; -namespace Humanizer +namespace Humanizer; + +/// +/// +public partial class OnDate +{ +<# +const int leapYear = 2012; +for (int month = 1; month <= 12; month++) { + var firstDayOfMonth = new DateTime(leapYear, month, 1); + var monthName = firstDayOfMonth.ToString("MMMM");#> /// + /// Provides fluent date accessors for <#= monthName #> /// - public partial class OnDate + public class <#= monthName #> { - <# - const int leapYear = 2012; - for (int month = 1; month <= 12; month++) + /// + /// The nth day of <#= monthName #> of the current year + /// + public static DateOnly The(int dayNumber) + => new(DateTime.Now.Year, <#= month #>, dayNumber); +<#for (int day = 1; day <= DateTime.DaysInMonth(leapYear, month); day++) { - var firstDayOfMonth = new DateTime(leapYear, month, 1); - var monthName = firstDayOfMonth.ToString("MMMM");#> - + var ordinalDay = day.Ordinalize();#> + /// - /// Provides fluent date accessors for <#= monthName #> + /// The <#= ordinalDay #> day of <#= monthName #> of the current year /// - public class <#= monthName #> - { - /// - /// The nth day of <#= monthName #> of the current year - /// - public static DateOnly The(int dayNumber) - { - return new DateOnly(DateTime.Now.Year, <#= month #>, dayNumber); - } - <#for (int day = 1; day <= DateTime.DaysInMonth(leapYear, month); day++) - { - var ordinalDay = day.Ordinalize();#> - - /// - /// The <#= ordinalDay #> day of <#= monthName #> of the current year - /// - public static DateOnly The<#= ordinalDay #> - { - get { return new DateOnly(DateTime.Now.Year, <#= month #>, <#= day #>); } - } - <#}#> -} - <#}#> - } + public static DateOnly The<#= ordinalDay #> + => new(DateTime.Now.Year, <#= month #>, <#= day #>); +<#}#> + } +<#}#> } #endif \ No newline at end of file