You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.4 KiB
Java
73 lines
2.4 KiB
Java
package com.rehome.dywoa.utils;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.Calendar;
|
|
import java.util.Date;
|
|
|
|
public class DataPassUtils {
|
|
|
|
public static boolean checkCanLogin(){
|
|
try {
|
|
//格式化日期的对象(转化成习惯的时间格式)
|
|
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
|
|
Date date = sdFormat.parse("2024年08月31日");
|
|
Calendar calendarOne = Calendar.getInstance();
|
|
calendarOne.setTime(date);
|
|
if (!Calendar.getInstance().after(calendarOne)) {
|
|
return true;
|
|
}
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
return false;
|
|
}
|
|
|
|
|
|
public static boolean checkCanLoginTokenLong(){
|
|
try {
|
|
//格式化日期的对象(转化成习惯的时间格式)
|
|
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
|
|
Date date = sdFormat.parse("2024年08月31日");
|
|
Calendar calendarOne = Calendar.getInstance();
|
|
calendarOne.setTime(date);
|
|
if (!Calendar.getInstance().after(calendarOne)) {
|
|
return true;
|
|
}
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public static boolean checkCanQj(){
|
|
try {
|
|
//格式化日期的对象(转化成习惯的时间格式)
|
|
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
|
|
Date date = sdFormat.parse("2024年08月31日");
|
|
Calendar calendarOne = Calendar.getInstance();
|
|
calendarOne.setTime(date);
|
|
if (!Calendar.getInstance().after(calendarOne)) {
|
|
return true;
|
|
}
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
return false;
|
|
}
|
|
public static boolean checkCanDj(){
|
|
try {
|
|
//格式化日期的对象(转化成习惯的时间格式)
|
|
SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy年MM月dd日");
|
|
Date date = sdFormat.parse("2024年08月31日");
|
|
Calendar calendarOne = Calendar.getInstance();
|
|
calendarOne.setTime(date);
|
|
if (!Calendar.getInstance().after(calendarOne)) {
|
|
return true;
|
|
}
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
return false;
|
|
}
|
|
}
|