Skip to content

Commit

Permalink
Reduce unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
geoperez committed Nov 13, 2023
1 parent c83eff2 commit fa8a399
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
7 changes: 0 additions & 7 deletions src/Unosquare.DateTimeExt/Date-Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,4 @@ public static DateTime OrNow(this DateTime date) =>

public static DateTime OrToday(this DateTime date) =>
date > DateTime.Today ? DateTime.Today : date;

public static YearQuarter ToYearQuarter(this DateTime date) => new(date);
public static YearMonth ToYearMonth(this DateTime date) => new(date);
public static YearWeek ToYearWeek(this DateTime date) => new(date);
public static MonthToDate ToMonthToDate(this DateTime date) => new(date);
public static YearToDate ToYearToDate(this DateTime date) => new(date.Year);
public static TrailingTwelveMonths ToTrailingTwelveMonths(this DateTime date) => new(date);
}
10 changes: 0 additions & 10 deletions src/Unosquare.DateTimeExt/YearMonth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@ public YearMonth(IHasReadOnlyMonth readOnlyMonth, IHasReadOnlyYear readOnlyYear)
{
}

public YearMonth(IHasReadOnlyMonth readOnlyMonth, int? year = null)
: this(readOnlyMonth.Month, year)
{
}

public YearMonth(int month, IHasReadOnlyYear readOnlyYear)
: this(month, readOnlyYear.Year)
{
}

public YearMonth(DateTime? dateTime)
: this((dateTime ?? DateTime.UtcNow).Month, (dateTime ?? DateTime.UtcNow).Year)
{
Expand Down
10 changes: 0 additions & 10 deletions src/Unosquare.DateTimeExt/YearQuarter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ public YearQuarter(IHasReadOnlyQuarter readOnlyQuarter, IHasReadOnlyYear readOnl
{
}

public YearQuarter(IHasReadOnlyQuarter readOnlyQuarter, int? year = null)
: this(readOnlyQuarter.Quarter, year)
{
}

public YearQuarter(int quarter, IHasReadOnlyYear readOnlyYear)
: this(quarter, readOnlyYear.Year)
{
}

public YearQuarter(DateTime? dateTime)
: this((dateTime ?? DateTime.UtcNow).GetQuarter(), (dateTime ?? DateTime.UtcNow).Year)
{
Expand Down

0 comments on commit fa8a399

Please sign in to comment.