This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var moment = require('moment'); | |
| var tz = require('timezone/loaded'); | |
| var time = require('time'); | |
| module.exports = function() { | |
| var strftime_format = '%F %T %z'; // used to convert a date into a normalized strftime format with timezone | |
| var moment_format = 'YYYY-MM-DD HH:mm:ss zz'; // moment.js LDML format for parsing date strings | |
| /** | |
| * Convert a Javascript Date into node-time wrapper with the appropriate timezone. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Dynamically create a page and navigate to it. | |
| (and include the page in browser history ) */ | |
| //create markup | |
| var newPage = $("<div data-role=page data-url=yay><div data-role=header><h1>YAY!!!!</h1></div><div data-role=content><img src=http://bukk.it/yay.gif /></div></div"); | |
| //append it to the page container | |
| newPage.appendTo( $.mobile.pageContainer ); | |
| //go to it |