Created
January 28, 2014 13:07
-
-
Save jasmin-mistry/8667287 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static IEnumerable<DateTime> GetDateRangeTo(this DateTime self, DateTime toDate) | |
{ | |
var range = Enumerable.Range(0, new TimeSpan(toDate.Ticks - self.Ticks).Days); | |
return from p in range select self.Date.AddDays(p); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment