better ui
This commit is contained in:
1 parent
e0b0ca48f2
commit
84abee712d
6 files changed
+66
-17
No files matched your search
@@ -0,0 +1,21 @@
|
||||
namespace YongeStreet.Controllers;
|
||||
|
||||
public static class Util
|
||||
{
|
||||
public static DateOnly? ParseDateOnly(string? date)
|
||||
{
|
||||
if (string.IsNullOrEmpty(date))
|
||||
{
|
||||
return new DateOnly(2025, 1, 1);
|
||||
}
|
||||
try
|
||||
{
|
||||
return DateOnly.ParseExact(date, "yyyy-MM-dd");
|
||||
}
|
||||
catch (FormatException e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user