/** * Function to parse dateTime into Days * @param <DateTime> $dateTime * @return <String> */ public static function formatDateTimeIntoDayString($dateTime) { $currentUser = Users_Record_Model::getCurrentUserModel(); $dateTimeInUserFormat = Vtiger_Datetime_UIType::getDisplayDateTimeValue($dateTime); list($dateInUserFormat, $timeInUserFormat, $meridiem) = explode(' ', $dateTimeInUserFormat); list($hours, $minutes, $seconds) = explode(':', $timeInUserFormat); $displayTime = $hours . ':' . $minutes . ' ' . $meridiem; $dateDay = vtranslate(DateTimeField::getDayFromDate($dateTime), 'Calendar'); $formatedDate = $dateInUserFormat . ' ' . vtranslate('LBL_AT') . ' ' . $displayTime . " ({$dateDay})"; return $formatedDate; }