/** * Returns a prettified date string for use in period selector widget. * * @param Period $period The period to return a pretty string for. * @return string * @api */ public static function getCalendarPrettyDate($period) { if ($period instanceof Month) { return $period->getLocalizedLongString(); } else { return $period->getPrettyString(); } }
/** * Returns a prettified date string for use in period selector widget. * * @param Period $period The period to return a pretty string for. * @return string * @api */ public static function getCalendarPrettyDate($period) { if ($period instanceof Month) { // show month name when period is for a month return $period->getLocalizedLongString(); } else { return $period->getPrettyString(); } }