namespace TrueCV.Application.Helpers;

public static class DateHelpers
{
    public static DateOnly? ParseDate(string? dateString)
    {
        if (string.IsNullOrWhiteSpace(dateString))
        {
            return null;
        }

        if (DateOnly.TryParse(dateString, out var date))
        {
            return date;
        }

        return null;
    }
}
