diff --git a/src/Skybrud.Essentials/Time/EssentialsTime.cs b/src/Skybrud.Essentials/Time/EssentialsTime.cs index 6693719..da3bb35 100644 --- a/src/Skybrud.Essentials/Time/EssentialsTime.cs +++ b/src/Skybrud.Essentials/Time/EssentialsTime.cs @@ -301,17 +301,17 @@ public class EssentialsTime : IComparable, IComparable, ICompara /// /// Gets whether the date of this matches the current day. /// - public bool IsToday => ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"); + public bool IsToday => TimeUtils.IsToday(DateTimeOffset); /// /// Gets whether the date of this matches the day after the current day. /// - public bool IsTomorrow => ToString("yyyy-MM-dd") == DateTime.Now.AddDays(+1).ToString("yyyy-MM-dd"); + public bool IsTomorrow => TimeUtils.IsTomorrow(DateTimeOffset); /// /// Gets whether the date of this matches the day before the current day. /// - public bool IsYesterday => ToString("yyyy-MM-dd") == DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"); + public bool IsYesterday => TimeUtils.IsYesterday(DateTimeOffset); /// /// Gets a string representation of the instance as specified by the ISO 8601 format.