Implement new static function wxDateTime::GetFirstWeekDay()

This function tries to determine the preferred first day of week to use in
calendars. The procedure for obtaining this information is highly
platform-dependent, and is not possible on all platforms; in that case
Sunday is used as the fallback value.

Implementations are included for MSW, OSX, and Linux.
This commit is contained in:
Lauri Nurmi
2017-07-09 12:12:04 +03:00
parent 6527607af7
commit 94c35b2cdd
7 changed files with 142 additions and 0 deletions

View File

@@ -392,6 +392,9 @@ public:
// returns true if the given year is a leap year in the given calendar
static bool IsLeapYear(int year = Inv_Year, Calendar cal = Gregorian);
// acquires the first day of week based on locale and/or OS settings
static bool GetFirstWeekDay(WeekDay *firstDay);
// get the century (19 for 1999, 20 for 2000 and -5 for 492 BC)
static int GetCentury(int year);