diff --git a/Models/DateOnlyFrame.cs b/Models/DateOnlyFrame.cs index abde573..4beddf8 100644 --- a/Models/DateOnlyFrame.cs +++ b/Models/DateOnlyFrame.cs @@ -25,8 +25,8 @@ public class DateOnlyFrame public override string ToString() { - var from = (fromDate == DateOnly.MinValue) ? "" : (fromDate.ToShortDateString()); - var to = (toDate == DateOnly.MaxValue) ? "" : (toDate.ToShortDateString()); + var from = (fromDate == DateOnly.MinValue) ? "" : (fromDate.ToString("yyyy-MM-dd")); + var to = (toDate == DateOnly.MaxValue) ? "" : (toDate.ToString("yyyy-MM-dd")); var hyphen = from != "" && to != "" ? "-" : ""; return $"{from}{hyphen}{to}"; } diff --git a/Models/DateTimeFrame.cs b/Models/DateTimeFrame.cs index f8cdb7b..09efea3 100644 --- a/Models/DateTimeFrame.cs +++ b/Models/DateTimeFrame.cs @@ -18,8 +18,8 @@ public class DateTimeFrame public override string ToString() { - var from = (FromDate == DateTime.MinValue) ? "" : ("-" + FromDate.ToShortDateString()); - var to = (ToDate == DateTime.MaxValue) ? "" : ("-" + ToDate.ToShortDateString()); + var from = (FromDate == DateTime.MinValue) ? "" : ("-" + FromDate.ToString("yyyy-MM-dd")); + var to = (ToDate == DateTime.MaxValue) ? "" : ("-" + ToDate.ToString("yyyy-MM-dd")); return $"{from}{to}"; }