军团活动:诸侯混战露出的接口
This commit is contained in:
@@ -2,6 +2,7 @@ import { TIME_FORMAT } from '../consts';
|
||||
|
||||
const PER_SECOND = 1 * 1000;
|
||||
const PER_DAY = 24 * 60 * 60;
|
||||
const PER_MINUTE = 60;
|
||||
const PER_HOUR = 60 * 60;
|
||||
|
||||
export function getSeconds(time: Date) {
|
||||
@@ -47,6 +48,10 @@ export function getBeforeHourSeconds(hour: number) {
|
||||
return time;
|
||||
}
|
||||
|
||||
export function getBeforeMinuteSeconds(minute: number) {
|
||||
let time = nowSeconds() - minute * PER_MINUTE;
|
||||
return time;
|
||||
}
|
||||
|
||||
export function getCurWeekDate(day: number, hour: number) {
|
||||
return getWeekDate(new Date(), day, hour);
|
||||
|
||||
Reference in New Issue
Block a user