git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59998
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+// scans all characters which can appear in a week day/month name
+//
+// this is different from GetAlphaToken() as some locales (e.g. fr_FR) use
+// trailing periods after the abbreviated week day/month names
+wxString
+GetNameToken(wxString::const_iterator& p,
+ const wxString::const_iterator& end)
+{
+ wxString token = GetAlphaToken(p, end);
+ if ( p != end && *p == '.' )
+ token += *p++;
+
+ return token;
+}
+
// parses string starting at given iterator using the specified format and,
// optionally, a fall back format (and optionally another one... but it stops
// there, really)
// parses string starting at given iterator using the specified format and,
// optionally, a fall back format (and optionally another one... but it stops
// there, really)
{
wday = GetWeekDayFromName
(
{
wday = GetWeekDayFromName
(
- GetAlphaToken(input, end),
+ GetNameToken(input, end),
*fmt == 'a' ? Name_Abbr : Name_Full,
DateLang_Local
);
*fmt == 'a' ? Name_Abbr : Name_Full,
DateLang_Local
);
{
mon = GetMonthFromName
(
{
mon = GetMonthFromName
(
- GetAlphaToken(input, end),
+ GetNameToken(input, end),
*fmt == 'b' ? Name_Abbr : Name_Full,
DateLang_Local
);
*fmt == 'b' ? Name_Abbr : Name_Full,
DateLang_Local
);