This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
package org.redkale.source;
|
||||
|
||||
import java.util.function.*;
|
||||
import org.redkale.util.Utility;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -195,6 +196,16 @@ public interface Range<E extends Comparable> extends java.io.Serializable, Predi
|
||||
if (max != null) this.max = max;
|
||||
}
|
||||
|
||||
public static LongRange todayRange() {
|
||||
long min = Utility.midnight();
|
||||
return new LongRange(min, min + 24 * 60 * 60 * 1000 - 1);
|
||||
}
|
||||
|
||||
public static LongRange yesterdayRange() {
|
||||
long min = Utility.midnight(System.currentTimeMillis() - 24 * 60 * 60 * 1000);
|
||||
return new LongRange(min, min + 24 * 60 * 60 * 1000 - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getMin() {
|
||||
return min;
|
||||
|
||||
Reference in New Issue
Block a user