summaryrefslogtreecommitdiff
path: root/protected/components/Format.php
diff options
context:
space:
mode:
authorPatrick Seeger <pseeger@ccwn.org>2012-05-20 16:58:26 +0200
committerPatrick Seeger <pseeger@ccwn.org>2012-05-20 16:58:26 +0200
commit4f959ffc80e64dc9ee8383826a546723d97305d9 (patch)
tree3a0704c0e3a9f44746739ccffa0d64acc5ab172d /protected/components/Format.php
parentacec2b5dc35302147f9a9c73d837dce2f3f9958e (diff)
parent9aad228e1af661b9b39df83700d27e71697dc66f (diff)
Merge branch 'master' of ssh://proxy.ccwn.org:9044/home/ccwn/git-repos/admin.astaf.de
Diffstat (limited to 'protected/components/Format.php')
-rw-r--r--protected/components/Format.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/protected/components/Format.php b/protected/components/Format.php
index 1be259f..a4802e2 100644
--- a/protected/components/Format.php
+++ b/protected/components/Format.php
@@ -8,8 +8,12 @@ class Format {
return Yii::app()->locale->numberFormatter->formatDecimal($value).' '.$einheit;
}
- public static function decimal($value) {
+ public static function decimal($value, $pattern = null) {
+ if ($pattern !== null) {
return Yii::app()->locale->numberFormatter->formatDecimal($value);
+ } else {
+ return Yii::app()->locale->numberFormatter->format($pattern, $value);
+ }
}
public static function percentage($value) {