示例#1
0
 /**
  * Function to get the datetime value in user preferred hour format
  * @param <type> $dateTime
  * @return <String> date and time with hour format
  */
 public static function getDateTimeValue($dateTime)
 {
     global $log;
     $log->debug("Entering ./uitypes/Datetime.php::staticgetDateTimeValue");
     return Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat($dateTime);
 }
示例#2
0
 /**
  * Function to get the datetime value in user preferred hour format
  * @param <type> $dateTime
  * @return <String> date and time with hour format
  */
 public static function getDateTimeValue($dateTime)
 {
     return Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat($dateTime);
 }
示例#3
0
 /**
  * Gets the Mail Date
  * @param Boolean $format
  * @return Date
  */
 public function date($format = false)
 {
     $date = $this->_date;
     if ($date) {
         if ($format) {
             $dateTimeFormat = Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat(date('Y-m-d H:i:s', strtotime($date)));
             list($date, $time, $AMorPM) = explode(' ', $dateTimeFormat);
             $pos = strpos($dateTimeFormat, date(DateTimeField::getPHPDateFormat()));
             if ($pos === false) {
                 return $date;
             } else {
                 return $time . ' ' . $AMorPM;
             }
         } else {
             return Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat(date('Y-m-d H:i:s', $date));
         }
     }
     return '';
 }