Compare commits

...

2 Commits

Author SHA1 Message Date
Sunny Side Up
cdd5a46aeb
Merge 4a6a3d19af into 165f72fd22 2024-10-22 12:56:53 +13:00
Sunny Side Up
4a6a3d19af
MINOR: adding SpelledOut method in DBInt 2023-12-18 16:28:44 +13:00

View File

@ -65,7 +65,13 @@ class DBInt extends DBField
{
return sprintf('%d', $this->value);
}
public function SpelledOut()
{
$v = $this->prepValueForDB($this->value);
return (new NumberFormatter(i18n::get_locale(), NumberFormatter::SPELLOUT))->format($v);
}
public function scaffoldFormField($title = null, $params = null)
{
return NumericField::create($this->name, $title);