Popular Posts
Generate subversion diff report using python bash: svn --diff-cmd "python" --extensions "diff_to_html.py" diff -r 596:671 diff_to_html.py import sys import diff... JSRequest, Get parameters from querystring with javascript in SharePoint Provides method to parse query string, filename, and pathname from URL // Initialize first JSRequest.EnsureSetup(); // Get the current fil... ROBOCOPY: Robust File Copy for Windows -------------------------------------------------------------------------------    ROBOCOPY     ::     Robust File Copy for Windows --------...
Stats
Quickly get first and last day of month
public static class DateTimeExtension
{
    public static DateTime FirstDayOfMonth(this DateTime bsaeDate)
    {
        //return new DateTime(bsaeDate.Year, bsaeDate.Month, 1);
        return bsaeDate.AddDays(-bsaeDate.Day + 1);
    }

    public static DateTime LastDayOfMonth(this DateTime baseDate)
    {
        //return new DateTime(baseDate.Year, baseDate.Month + 1, 1).AddDays(-1);
        return baseDate.AddMonths(1).AddDays(-baseDate.AddMonths(1).Day);
    }
}