Skip to content

Commit

Permalink
Merge pull request #660 from hudl/fix-regexanchors
Browse files Browse the repository at this point in the history
Fix: strings that start with a date wrongly treated as date fields
  • Loading branch information
arikfr committed Nov 21, 2015
2 parents 5beec58 + 165d782 commit 5bf370d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rd_ui/app/scripts/services/resources.js
Expand Up @@ -45,7 +45,7 @@
} else if (_.isString(v) && v.match(/^\d{4}-\d{2}-\d{2}T/)) {
row[k] = moment.utc(v);
columnTypes[k] = 'datetime';
} else if (_.isString(v) && v.match(/^\d{4}-\d{2}-\d{2}/)) {
} else if (_.isString(v) && v.match(/^\d{4}-\d{2}-\d{2}$/)) {
row[k] = moment.utc(v);
columnTypes[k] = 'date';
} else if (typeof(v) == 'object' && v !== null) {
Expand Down

0 comments on commit 5bf370d

Please sign in to comment.