/**
  * Determine Widget Value
  *
  * Determines the correct source to use for the value of this widget and
  * format that value as such: MM-DD-YYYY or DD-MM-YYYY
  * The order goes like this:
  *   5. No value
  *   4. The default value set in the config file
  *   3. The value given by the 'value' parameter of the {form_field} tag
  *   2. The value of this field in the specified DBO
  *   1. The value as entered by the user
  *
  * @param array $params Paramets passed from the template
  * @throws SWException
  * @return string The value to use
  */
 protected function determineValue($params)
 {
     $value = parent::determineValue($params);
     if (is_string($value)) {
         $tsValue = strlen($value) > 10 ? DBConnection::datetime_to_unix($value) : DBConnection::date_to_unix($value);
     } else {
         $tsValue = $value;
     }
     return $this->TS2Date($tsValue == null ? time() : $tsValue);
 }
 /**
  * Get Widget HTML
  *
  * Returns HTML code for this widget
  *
  * @param array $params Parameters passed from the template
  * @return string HTML code for this widget
  */
 function getHTML($params)
 {
     global $conf;
     return $conf['locale']['currency_symbol'] . parent::getHTML($params);
 }