OmarSkalli / fixy

Library for generating fixed width documents
MIT License
100 stars 45 forks source link

numeric and alphanumeric formatters? #2

Open arisi opened 10 years ago

arisi commented 10 years ago

Hello,

nice work here -- but your web page mentions numeric formatter, and that is not included in the git source... just wondering if it an oversight, or should I write it ?

surely they are needed by almost anyone making fixed records.

OmarSkalli commented 10 years ago

I was initially planning on including a numeric formatter, but realized it may be more interest to let developers write their own. From experience, different specifications format numeric slightly differently, in particular when it comes to negative values.

For example, should "7" be formatted as "007", "+007", "007+", " 7". I'm not opposed to adding common formatters with descriptive enough names however if you want.