Simplify Number::format()
also adjust helper
fix test
Merge pull request #3270 from dereuromark/3.0-format

Simplify Number::format()