update DateOnly constructor

This commit is contained in:
honzapatCZ 2025-04-04 19:48:12 +02:00
parent 78439c95e4
commit 8766c99426

View File

@ -104,7 +104,7 @@ public static class Extensions
public static IEnumerable<TType> ApplyDateTimeFrameE<TType>(this ICollection<TType> query, Func<TType, DateTime> dateAcessor, DateTimeFrame frame) => query.Where(e => dateAcessor(e) >= frame.FromDate && dateAcessor(e) <= frame.ToDate);
[Projectable]
public static DateOnly ToDateOnly(this DateTime date) => new DateOnly(date.Year, date.Month, date.Day);
public static DateOnly ToDateOnly(this DateTime date) => DateOnly.FromDateTime(date);
[Projectable]
public static DateTime ToDateTime(this DateOnly date) => new DateTime(date.Year, date.Month, date.Day);
[Projectable]