Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged format



« Prev 1 Next »
  1. FAV

    Add commas to numbers

    A quick function that makes it easy to convert an integer into a number string with commas inserted.
    JavaScript 3 views posted 6 years ago by uberdragon
  2. FAV

    Format a US Phone Numner

    Generic function - Pass the context to the function for use with any field
    JavaScript 5 views posted 6 years ago by chetkloss
  3. FAV

    Javascript Basic Date Formatter

    Javascript Basic Date Formatter
    JavaScript 13 views posted 7 years ago by samsonl
  4. FAV

    format numbers in javascript with group digits

    format numbers in javascript with group digits
    JavaScript 8 views posted 7 years ago by rg443
  5. FAV

    format thousands

    Thanks to http://www.mredkj.com/javascript/numberFormat.html#addcommas
    JavaScript 3 views posted 8 years ago by fengelz
  6. FAV

    JavaScript Date Formatting

    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
    JavaScript 10 views posted 8 years ago by wizard04
  7. FAV

    Python like string formatting in javascript

    JavaScript 4 views posted 9 years ago by metoikos
  8. FAV

    Format string as money

    JavaScript 1 views posted 9 years ago by housecor
  9. FAV

    Format a string with an array of arguments

    JavaScript 5 views posted 9 years ago by rmariuzzo
  10. FAV

    output an array without for or while loop

    JavaScript 6 views posted 9 years ago by hand4ever
  11. FAV

    sharepoint javascript date formatter

    converts date/time that sharepoint kicks out to m/d/y format.
    JavaScript 5 views posted 9 years ago by rumremix
  12. FAV

    Sprintf in Javascript (string format)

    Example: `var result = "Hello {0}! This is {1}.".format("world","foo bar");` Returns: `"Hello World! This is foo bar."`
    JavaScript saved by 4 people 7 views posted 11 years ago by jasonseney
  13. FAV

    Format number with commas every 3 decimal places

    Adds commas to numbers. 1234567 becomes 1,234,567
    JavaScript saved by 2 people 1 views posted 11 years ago by jdstraughan
  14. FAV

    Format (humanize) file byte size presentation in javascript

    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.
    JavaScript 10 views posted 11 years ago by inkdeep
  15. FAV

    Formatting dates in JavaScript (handles MySQL dates)

    JavaScript saved by 4 people 6 views posted 12 years ago by penguin999
  16. FAV

    Trim Leading & Trailing Whitespace

    Trims leading and trailing spaces from a string value and returns the result as a new string.
    JavaScript saved by 2 people 4 views posted 13 years ago by splorp
« Prev 1 Next »