Files
RealCV/src/RealCV.Application/Helpers/DateHelpers.cs
Peter Foster 998e9a8ab8 Rename project to RealCV with new logo and font updates
- Rename all TrueCV references to RealCV across the codebase
- Add new transparent RealCV logo
- Switch from JetBrains Mono to Inter font for better number clarity
- Update solution, project files, and namespaces

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:07:20 +00:00

36 lines
866 B
C#

namespace RealCV.Application.Helpers;
public static class DateHelpers
{
/// <summary>
/// Calculates the number of months between two dates.
/// </summary>
public static int MonthsBetween(DateOnly start, DateOnly end)
{
return ((end.Year - start.Year) * 12) + (end.Month - start.Month);
}
/// <summary>
/// Calculates the number of months between two dates.
/// </summary>
public static int MonthsBetween(DateTime start, DateTime end)
{
return ((end.Year - start.Year) * 12) + (end.Month - start.Month);
}
public static DateOnly? ParseDate(string? dateString)
{
if (string.IsNullOrWhiteSpace(dateString))
{
return null;
}
if (DateOnly.TryParse(dateString, out var date))
{
return date;
}
return null;
}
}