+
+ return pageChanged;
+}
+
+void wxCalendarCtrlBase::EnableHolidayDisplay(bool display)
+{
+ long style = GetWindowStyle();
+ if ( display )
+ style |= wxCAL_SHOW_HOLIDAYS;
+ else
+ style &= ~wxCAL_SHOW_HOLIDAYS;
+
+ if ( style == GetWindowStyle() )
+ return;
+
+ SetWindowStyle(style);
+
+ if ( display )
+ SetHolidayAttrs();
+ else
+ ResetHolidayAttrs();
+
+ RefreshHolidays();
+}
+
+bool wxCalendarCtrlBase::SetHolidayAttrs()
+{
+ if ( !HasFlag(wxCAL_SHOW_HOLIDAYS) )
+ return false;
+
+ ResetHolidayAttrs();
+
+ wxDateTime::Tm tm = GetDate().GetTm();
+ wxDateTime dtStart(1, tm.mon, tm.year),
+ dtEnd = dtStart.GetLastMonthDay();
+
+ wxDateTimeArray hol;
+ wxDateTimeHolidayAuthority::GetHolidaysInRange(dtStart, dtEnd, hol);
+
+ const size_t count = hol.GetCount();
+ for ( size_t n = 0; n < count; n++ )
+ {
+ SetHoliday(hol[n].GetDay());
+ }
+
+ return true;