better stringifaction for dateframes
This commit is contained in:
parent
51f66b2b2c
commit
b1e8e387ff
|
|
@ -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}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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}";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user