HDateTimeRange.thisMonth constructor
HDateTimeRange.thisMonth(
- HTimeZone tz
Make a range which encompasses the current month.
Implementation
factory HDateTimeRange.thisMonth(HTimeZone tz) {
HDate today = HDate.today(tz);
HDate first = HDate(today.year, today.month, 1);
HDate last = HDate(
today.year, today.month, HDate.daysInMonth(today.year, today.month));
return HDateTimeRange.datesAndTZ(first, last, tz);
}