I did this:
DateTime dt = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
int dias = (int)dt.Subtract(DateTime.Today).TotalDays;
If you do for today (01/26/2018) the result in var dias
is:
-25
I just wanted to know why it came negative, just to understand.