c# - Get range of days in a week given a certain day -
suppose input march 31, 2015.
how able days of week march 31, 2015 in?
in case, should output:
march 29, 2015-april 4, 2015
i found similar here it's not quite i'm looking 1 takes in week number while input date itself.
datetime date = new datetime(2015, 3, 31); datetime weekfirstday = date.adddays(dayofweek.sunday - date.dayofweek); datetime weeklastday = weekfirstday.adddays(6);
Comments
Post a Comment