X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c9863aca7b164a3fa3fcb61af9f0fbdf30e08f2..e91e1e3d5cab263883c1cee1689c898b8f7c4ecd:/include/wx/generic/calctrlg.h?ds=sidebyside diff --git a/include/wx/generic/calctrlg.h b/include/wx/generic/calctrlg.h index 7e75370ed4..8e430b6231 100644 --- a/include/wx/generic/calctrlg.h +++ b/include/wx/generic/calctrlg.h @@ -1,10 +1,9 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: generic/calctrlg.h +// Name: wx/generic/calctrlg.h // Purpose: generic implementation of date-picker control // Author: Vadim Zeitlin // Modified by: // Created: 29.12.99 -// RCS-ID: $Id$ // Copyright: (c) 1999 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -199,6 +198,20 @@ private: // get the date from which we start drawing days wxDateTime GetStartDate() const; + // get the first/last days of the week corresponding to the current style + wxDateTime::WeekDay GetWeekStart() const + { + return HasFlag(wxCAL_MONDAY_FIRST) ? wxDateTime::Mon + : wxDateTime::Sun; + } + + wxDateTime::WeekDay GetWeekEnd() const + { + return HasFlag(wxCAL_MONDAY_FIRST) ? wxDateTime::Sun + : wxDateTime::Sat; + } + + // is this date shown? bool IsDateShown(const wxDateTime& date) const;