I am reading a cookie expires (2 hours) from the database, and I need to check if this date has passed. What is the best way to do this?
For instance:
public bool HasExpired(DateTime now) { string expires = ReadDateFromDataBase();
I am looking for ideas on how to write a .HasPassed2hoursFrom method.
source share