Skip to content

Commit

Permalink
Using nodejs instead of phantomjs for testing QUnit, for better date
Browse files Browse the repository at this point in the history
parsing support.
  • Loading branch information
jakefeasel committed Jan 23, 2013
1 parent 0cb7fee commit 5bc6b2f
Show file tree
Hide file tree
Showing 1,458 changed files with 209,405 additions and 1,560 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -2,4 +2,4 @@ language: node_js
node_js:
- 0.6
script:
- "phantomjs run-qunit.js qunit.html"
- "node nodetest.js"
3 changes: 2 additions & 1 deletion ddl_builder/ddl_builder.js
Expand Up @@ -367,8 +367,9 @@ define(
if (colType == 'charType')
return new Handlebars.SafeString("'" + this.v.replace(/'/g, "''") + "'");

if (colType == 'dateType')
if (colType == 'dateType') {
return new Handlebars.SafeString("'" + dateFormat("UTC:" + this.v, root.dateFormatMask) + "'");
}

return this.v;
});
Expand Down
2 changes: 1 addition & 1 deletion ddl_builder/handlebarsHelpers/each_with_index.js
Expand Up @@ -15,7 +15,7 @@ define(["Handlebars"], function (Handlebars) {
item.last = (k == array.length);

// show the inside of the block
buffer += fn(item);
buffer += fn.fn(item);

k++;
}
Expand Down
3 changes: 1 addition & 2 deletions libs/date.format.js
Expand Up @@ -11,8 +11,7 @@
* The date defaults to the current date/time.
* The mask defaults to dateFormat.masks.default.
*/

var dateFormat = function () {
dateFormat = function () {
var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
timezoneClip = /[^-+\dA-Z]/g,
Expand Down

0 comments on commit 5bc6b2f

Please sign in to comment.