Adjust differentiation accuracy to about a year
This commit is contained in:
parent
0d1ac6ae56
commit
accac8c6ab
|
@ -534,7 +534,7 @@ public enum EpisodeMetrics implements SimilarityMetric {
|
|||
public float getSimilarity(Object o1, Object o2) {
|
||||
// adjust differentiation accuracy to about a year
|
||||
float f = super.getSimilarity(o1, o2);
|
||||
return f >= 0.8 ? 1 : f >= 0 ? 0 : -1;
|
||||
return f >= 0.9 ? 1 : f >= 0 ? 0 : -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -7,7 +7,6 @@ import java.time.LocalDateTime;
|
|||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Arrays;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
@ -49,7 +48,7 @@ public class SimpleDate implements Serializable, Comparable<Object> {
|
|||
}
|
||||
|
||||
public long getTimeStamp() {
|
||||
return new GregorianCalendar(year, month - 1, day).getTimeInMillis(); // Month value is 0-based, e.g. 0 for January
|
||||
return this.toLocalDate().atStartOfDay(ZoneId.systemDefault()).toInstant().toEpochMilli();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue