About 17,600,000 results
Open links in new tab
  1. JavaScript equivalent to printf/String.Format - Stack Overflow

    Mar 4, 2009 · I'm looking for a good JavaScript equivalent of the C/PHP printf() or for C#/Java programmers, String.Format() (IFormatProvider for .NET). My basic requirement is a thousand …

  2. How do I format a date in JavaScript? - Stack Overflow

    How do I format a Javascript Date object as a string? (Preferable format: 10-Aug-2010)

  3. Format number to always show 2 decimal places - Stack Overflow

    May 26, 2011 · If you're already using jQuery, you could look at using the jQuery Number Format plugin. The plugin can return formatted numbers as a string, you can set decimal, and …

  4. javascript - Timestamp to human readable format - Stack Overflow

    Well I have a strange problem while convert from unix timestamp to human representation using javascript Here is timestamp 1301090400 This is my javascript var date = new …

  5. Parsing a string to a date in JavaScript - Stack Overflow

    How can I convert a string to a Date object in JavaScript? var st = "date in some format" var dt = new Date (); var dt_st = // st in Date format, same as dt.

  6. How do I output an ISO 8601 formatted string in JavaScript?

    Apr 4, 2010 · The best solution I've come across is to use the Moment.js javascript library and use the following code: To get the current ISO time with timezone information and milliseconds

  7. How to change date format in JavaScript - Stack Overflow

    Dec 31, 2015 · @pceccon Answer to an old question for future readers, but the format should have been ("yyyy-MM-dd"). The library is case sensitive since you need to distinguish between …

  8. javascript - Display date/time in user's locale format and time …

    Dec 2, 2016 · I want the server to always serve dates in UTC in the HTML, and have JavaScript on the client site convert it to the user's local timezone. Bonus if I can output in the user's …

  9. How can I format an integer to a specific length in javascript?

    The simplest way I can think of is this: ("000" + num).slice(-4) A padded number is a string. When you add a number to a string, it is converted to a string. Strings has the method slice, that …

  10. javascript - How to convert a Date to UTC? - Stack Overflow

    Using the JavaScript Date object, how would you convert the first "localized" date range into something the server will understand? I hope by now you realize that the premise of this …

Refresh