Fixed Calendar vs. Date bug in time range facet
git-svn-id: http://google-refine.googlecode.com/svn/trunk@1699 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
dfa9c538c7
commit
8d422e2e54
@ -33,6 +33,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package com.google.refine.browsing.util;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.Properties;
|
||||
@ -161,6 +162,10 @@ public class ExpressionTimeValueBinner implements RowVisitor, RecordVisitor {
|
||||
if (ExpressionUtils.isError(value)) {
|
||||
hasError = true;
|
||||
} else if (ExpressionUtils.isNonBlankData(value)) {
|
||||
if (value instanceof Calendar) {
|
||||
value = ((Calendar) value).getTime();
|
||||
}
|
||||
|
||||
if (value instanceof Date) {
|
||||
long t = ((Date) value).getTime();
|
||||
hasTime = true;
|
||||
|
@ -50,7 +50,7 @@ function TimeRangeFacet(div, config, options) {
|
||||
this._baseBlankCount = 0;
|
||||
this._baseErrorCount = 0;
|
||||
|
||||
this._TimeCount = 0;
|
||||
this._timeCount = 0;
|
||||
this._nonTimeCount = 0;
|
||||
this._blankCount = 0;
|
||||
this._errorCount = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user