This project consists of two libraries that dynamically build a formatting function for number and date formatting. The date formatting is very similar to PHP's functionality; it also permits parsing dates. The number formatting is similar to MS Excel formatting. The technique of building a function to implement each formatting instruction leads to cleaner code that is richer in functionality and much faster than other popular libraries, as proven by benchmarks.
There is also a date chooser application (aka calendar form control) that uses the functionality provided by these libraries. And there's a JavaScript combo box and HTML input mask.
The code was originally developed and hosted on http://www.xaprb.com/ but is now being hosted here so all can contribute to it. It is now licensed under the MIT license, not the LGPL as it originally was.
All are invited to contribute; the original developer is very short on time, so if you want something done, please just do it yourself and don't wait for others. Anyone who requests commit access to the Subversion repository will be granted. Email baron.schwartz at gmail.com to request commit access.
Here are links to some blog posts about these functions:
http://www.xaprb.com/blog/2005/12/12/javascript-closures-for-runtime-efficiency/ http://www.xaprb.com/blog/2005/09/29/javascript-date-chooser/ http://www.xaprb.com/blog/2005/12/20/javascript-date-parsing/ http://www.xaprb.com/blog/2006/01/05/javascript-number-formatting/ http://www.xaprb.com/blog/2006/05/14/javascript-date-formatting-benchmarks/ http://www.xaprb.com/blog/2006/11/02/how-to-create-input-masks-in-html/ http://www.xaprb.com/blog/2005/09/29/javascript-combo-box/ Demo pages:
http://www.xaprb.com/articles/date-formatting-demo.html http://www.xaprb.com/articles/number-formatting-demo.html http://www.xaprb.com/articles/javascript-date-chooser-demo.html http://www.xaprb.com/html-input-mask/html-form-input-mask.html There's a github clone of the code here:
http://github.com/mdalessio/flexible-js-formatting/tree/master
30 Day Summary Apr 14 2013 — May 14 2013
|
12 Month Summary May 14 2012 — May 14 2013
|
Copyright
©
2013
Black Duck Software, Inc.
and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a
Creative Commons Attribution 3.0 Unported License
. Ohloh
®
and the Ohloh logo are trademarks of
Black Duck Software, Inc.
in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.