Don't use private date_ property (see #1026)

It looks like at some point the Closure Library exposed a public `date` property for this same purpose.  The version of the Closure Library that comes with the closure-util package uses this property.  At some point later, I'll demonstrate how we can control which version of the library we depend on.
This commit is contained in:
Tim Schaub
2013-09-14 13:00:55 -06:00
parent 75fffd1f47
commit 377da9349e

View File

@@ -318,7 +318,16 @@ ol.parser.KML = function(opt_options) {
value += ':00';
}
}
container.whens.push(goog.date.fromIsoString(value).date_);
var date = goog.date.fromIsoString(value);
if (!goog.isNull(date)) {
/**
* Older Closure Library did not provide a date property on
* goog.date.DateTime. When we get rid of Plovr, this can be
* simplified to use the date property.
*/
date = new Date(date.getTime());
}
container.whens.push(date);
},
'_trackPointAttribute': function(node, container) {
var name = node.nodeName.split(':').pop();