better ui

This commit is contained in:
didier committed 2025-01-05 19:43:30 -05:00
1 parent e0b0ca48f2
commit 84abee712d
6 files changed
+66 -17

No files matched your search

+21
View File
@@ -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;
}
}
}