fork download
  1. void GetMonthRangeInUtc(DateTime aDate, out DateTime utcMonthStart, out DateTime utcNextMonthStart)
  2. {
  3. // compute the first day of the month containing aDate and successive months
  4. DateTime[] monthStart = new DateTime[2];
  5. for (int i = 0; i < monthStart.Length; i++)
  6. {
  7. monthStart[i] = new DateTime(aDate.Year, aDate.Month++, 1);
  8. }
  9.  
  10. // Compute the offset from UTC to our local time (UTC + offset = localtime).
  11. TimeSpan utcOffset = TimeZone.CurrentTimeZone.GetUtcOffset(aDate);
  12.  
  13. // convert local times to UTC (UTC = localtime - offset)
  14. utcMonthStart = monthStart[0].Subtract(utcOffset);
  15. utcNextMonthStart = monthStart[1].Subtract(utcOffset);
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1february 14 2010 
compilation info
prog.cs(1,0): error CS1525: Unexpected symbol `void'
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty