Skip to content

Commit

Permalink
Merge branch 'hotfix/2.21.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
jwalgran committed Jan 2, 2019
2 parents 1944121 + 5dff508 commit 7c9fc6e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
12 changes: 10 additions & 2 deletions filterObjectUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,28 @@ var config = require('./config');
// and format date and datetime strings.
var DATETIME_FORMATS = {
full: 'YYYY-MM-DD HH:mm:ss',
fullWithT: 'YYYY-MM-DDTHH:mm:ss',
date: 'YYYY-MM-DD',
time: 'HH:mm:ss'
};

// We always want to use strict mode for our date parsing. Defining a boolean
// constant makes the moment constructor calls more self documenting.
var STRICT = true;

// `isDateString` returns a boolean indicating whether or not the string value
// should be treated as datetime.
function isDateTimeString(value) {
return moment(value, DATETIME_FORMATS.full).isValid();
return moment(value, DATETIME_FORMATS.full, STRICT).isValid() ||
moment(value, DATETIME_FORMATS.fullWithT, STRICT).isValid();
}

// `dateTimeStringToSqlValue` converts a datetime string into a Postgres
// compatible literal date and time value.
function dateTimeStringToSqlValue(dtString) {
var m = moment(dtString, DATETIME_FORMATS.full);
var m = moment(dtString, DATETIME_FORMATS.full, STRICT).isValid() ?
moment(dtString, DATETIME_FORMATS.full, STRICT) :
moment(dtString, DATETIME_FORMATS.fullWithT, STRICT);
return "(DATE '" + m.format(DATETIME_FORMATS.date) +
"' + TIME '" + m.format(DATETIME_FORMATS.time) + "')";
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"dependencies": {
"express": "3.21.2",
"moment": "2.1.0",
"moment": "2.19.3",
"rollbar": "^2.2.7",
"underscore": "^1.8.3",
"windshaft": "^3.3.1"
Expand Down
15 changes: 10 additions & 5 deletions style/mapFeature.mms
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
// If any changes are made to this stylesheet, make sure those
// changes are replicated in uncoloredMapFeature.mms (if necessary)

@tree_fill_color: #8BAA3D;
@empty_plot_fill_color: #BCA371;
@tree_fill_color: #8BAA3C;
@tree_stroke_color: #A5BF5B;

@empty_plot_fill_color: #E1C6FF;
@empty_plot_stroke_color: #D4B5F9;

@gsi_fill_color: #388E8E;

@tree_gsi_border_color: #b6ce78;
@empty_plot_border_color: #D3C3A5;

#treemap_mapfeature {
[tree_id!=null][feature_type="Plot"] {
Expand All @@ -22,9 +25,11 @@

marker-allow-overlap: true;


[tree_id!=null][feature_type="Plot"][zoom >= 15] {
marker-line-color: @tree_stroke_color;
}
[tree_id=null][feature_type="Plot"][zoom >= 15] {
marker-line-color: @empty_plot_border_color;
marker-line-color: @empty_plot_stroke_color;
}
[tree_id!=null][feature_type="Plot"][zoom >= 15] {
marker-line-color: @tree_gsi_border_color;
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1498,9 +1498,9 @@ mocha@^3.5.2:
mkdirp "0.5.1"
supports-color "3.1.2"

moment@2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.1.0.tgz#1fd7b1134029a953c6ea371dbaee37598ac03567"
moment@2.19.3:
version "2.19.3"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.3.tgz#bdb99d270d6d7fda78cc0fbace855e27fe7da69f"

morgan@~1.6.1:
version "1.6.1"
Expand Down

0 comments on commit 7c9fc6e

Please sign in to comment.