Formatting numbers and dates

Formatting numbers and dates is, to put it mildly, insanely difficult. Thankfully, jQuery/globalize (and YASMF's wrapper) make it very easy to support.

Getting ready

Let's create a shell www/index.html so that we can fill it in as we progress through the remaining sections. As you proceed, you can run the app and see the results:

<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="viewport" content="width=device-width, maximum-scale=1.0" /> <meta name="format-detection" content="telephone=no" /> <link rel="stylesheet" type="text/css" href="js/lib/yasmf.css"/> <title>Localization Demo</title> </head> <body> <div id="output">Results of localizations:</div> ...

Get PhoneGap 3.x Mobile Application Development HOTSHOT now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.