Welcome To Snipplr
Everyone's Recent JavaScript Snippets Tagged format
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« Prev 1 Next »
A quick function that makes it easy to convert an integer into a number string with commas inserted.
0
867
posted 11 years ago by uberdragon
Generic function - Pass the context to the function for use with any field
0
879
posted 11 years ago by chetkloss
Thanks to http://www.mredkj.com/javascript/numberFormat.html#addcommas
0
739
posted 13 years ago by fengelz
Format a date into a string using several string variables.
Usage:
(new Date("6/6/2011")).format("%W, %B %d%o, %Y");
Result:
Monday, June 6th, 2011
0
1114
posted 13 years ago by wizard04
Example:
`var result = "Hello {0}! This is {1}.".format("world","foo bar");`
Returns:
`"Hello World! This is foo bar."`
2
1183
posted 16 years ago by jasonseney
I use this in addition to the
number_format (http://snipplr.com/view/5945/javascript-numberformat--ported-from-php/)
snippit in SWFUpload to display the size of files a user is preparing to upload.
0
4017
posted 16 years ago by inkdeep
Trims leading and trailing spaces from a string value and returns the result as a new string.
1
1041
posted 18 years ago by splorp
« Prev 1 Next »