diff options
| author | ccwn <tzur@ccwn.org> | 2012-04-24 18:49:57 +0200 |
|---|---|---|
| committer | ccwn <tzur@ccwn.org> | 2012-04-24 18:49:57 +0200 |
| commit | c98745edd2c7b2f48bc3493c4dd9a061376c4720 (patch) | |
| tree | ca1b559f220ec28c3f263d02a8b832613493471f /protected/components/Format.php | |
| parent | 314328f527e8cae759d496f528a1472d7970c137 (diff) | |
- Database setup
- Database schema
- Database dev data
- config for new database setup
- Update in AngebotVerein
- Update in Speis&Trank
- Update in Verein
- Update in Kategorie
Diffstat (limited to 'protected/components/Format.php')
| -rw-r--r-- | protected/components/Format.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/protected/components/Format.php b/protected/components/Format.php new file mode 100644 index 0000000..129a292 --- /dev/null +++ b/protected/components/Format.php @@ -0,0 +1,18 @@ +<?php +class Format { + public static function currency($value, $currency = 'EUR') { + return Yii::app()->locale->numberFormatter->formatCurrency($value, $currency); + } + + public static function number($value, $einheit = '') { + return Yii::app()->locale->numberFormatter->formatDecimal($value).' '.$einheit; + } + + public static function decimal($value) { + return Yii::app()->locale->numberFormatter->formatDecimal($value); + } + + public static function percentage($value) { + return Yii::app()->locale->numberFormatter->formatPercentage($value); + } +}
\ No newline at end of file |
