private static function convertValueForDisplay($value, $format, $unit) { if ($format == "number") { return $value . $unit; } if ($format == "time") { return ConversionHelpers::ToTime($value); } if ($format == "date") { return date('Y-m-d', $value); } //todo: might be wrong, needs to go into converseion helper and needs a test if ($format == "metric") { return ConversionHelpers::ToMetric($value); } if ($format == "currency") { return ConversionHelpers::ToCurrency($value); } }
private static function convertValueForDisplay($value, $format, $unit) { if ($format == "number") { return $value . $unit; } if ($format == "time") { return ConversionHelpers::ToTime($value); } if ($format == "date") { return $this->ToDate($value); } if ($format == "metric") { return ConversionHelpers::ToMetric($value); } if ($format == "currency") { return ConversionHelpers::ToCurrency($value); } }