This commit is contained in:
Sunny Side Up 2024-10-22 12:56:53 +13:00 committed by GitHub
commit cdd5a46aeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,6 +66,12 @@ 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);