public static function timeSelector($prefix, $editable, $timestamp = null) { if ($editable) { $minutes = CentralNotice::paddedRange(0, 59); $hours = CentralNotice::paddedRange(0, 23); // Normalize timestamp format... $ts = wfTimestamp(TS_MW, $timestamp); $fields = array(array("hour", "centralnotice-hours", $hours, substr($ts, 8, 2)), array("min", "centralnotice-min", $minutes, substr($ts, 10, 2))); return CentralNotice::createSelector($prefix, $fields); } else { global $wgLang; return $wgLang->time($timestamp); } }