+
+ /**
+ * Converts the given date string according to the user's locale setting.
+ *
+ * @param string $dateStr Date in format YYYY-MM-DD
+ *
+ * @return string Formatted date
+ */
+ protected function getLocalDate($dateStr)
+ {
+ if ($dateStr{0} != '?') {
+ return strftime('%x', strtotime($dateStr));
+ }
+
+ $dateStr = str_replace('????', '1899', $dateStr);
+ return str_replace(
+ array('1899', '99'),
+ array('????', '??'),
+ strftime('%x', strtotime($dateStr))
+ );
+ }