Files
InventoryTracker/InventoryTraker.Web/Utilities/DateExtensions.cs
T
2016-08-08 14:47:35 -04:00

17 lines
363 B
C#

using System;
namespace InventoryTraker.Web.Utilities
{
public static class DateExtensions
{
public static DateTime ToStartOfMonth(this DateTime date)
{
return new DateTime(date.Year, date.Month, 1);
}
public static DateTime ToEndOfMonth(this DateTime date)
{
return new DateTime(date.Year, date.Month, 1).AddMonths(1).AddDays(-1);
}
}
}