当前位置:网站首页>After time judgment of date
After time judgment of date
2022-04-23 15:14:00 【A run】
Date nd=new Date();
Date goServiceTime=DateUtil.stringToDate("2021-09-18"+" "+"16:00", DateUtil.DATE_TIME_FORMAT_TIME);// Door to door service time
Date dayend=DateUtil.additionDate(nd, 24);//+24
// current time +24》 Door to door service time You cannot return
if(dayend.after(goServiceTime)) {
//after > before <
System.out.println(" You can't go back ");
}
public static Date stringToDate(String datestr, String dateformat) {
Date date = new Date();
SimpleDateFormat df = new SimpleDateFormat(dateformat);
try {
date = df.parse(datestr);
} catch (ParseException e) {
e.printStackTrace();
}
return date;
}
after >
before <
版权声明
本文为[A run]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231407312819.html
边栏推荐
- 重定向和请求转发详解
- Sword finger offer (1) -- for Huawei
- Introduction to distributed transaction Seata
- 免费在upic中设置OneDrive或Google Drive作为图床
- Byte interview programming question: the minimum number of K
- kubernetes之常用Pod控制器的使用
- adobe illustrator 菜单中英文对照
- UML学习_day2
- Introduction to dirty reading, unrepeatable reading and phantom reading
- Analysis of common storage types and FTP active and passive modes
猜你喜欢

Have you learned the basic operation of circular queue?

About UDP receiving ICMP port unreachable

UML learning_ Day2

Tun equipment principle

Leetcode exercise - 396 Rotation function

我的树莓派 Raspberry Pi Zero 2W 折腾笔记,记录一些遇到的问题和解决办法
![Detailed explanation of C language knowledge points - data types and variables [2] - integer variables and constants [1]](/img/d4/9ee62772b42fa77dfd68a41bde1371.png)
Detailed explanation of C language knowledge points - data types and variables [2] - integer variables and constants [1]

Redis master-slave synchronization
![Design of digital temperature monitoring and alarm system based on DS18B20 single chip microcomputer [LCD1602 display + Proteus simulation + C program + paper + key setting, etc.]](/img/c6/5241de0d670da3dae136a3047c6160.jpg)
Design of digital temperature monitoring and alarm system based on DS18B20 single chip microcomputer [LCD1602 display + Proteus simulation + C program + paper + key setting, etc.]

Leetcode162 - find peak - dichotomy - array
随机推荐
C语言超全学习路线(收藏让你少走弯路)
Compiling OpenSSL
On the day of entry, I cried (mushroom street was laid off and fought for seven months to win the offer)
js——实现点击复制功能
Mds55-16-asemi rectifier module mds55-16
Redis cluster principle
博睿数据携手F5共同构建金融科技从代码到用户的全数据链DNA
Borui data and F5 jointly build the full data chain DNA of financial technology from code to user
API gateway / API gateway (II) - use of Kong - load balancing
8.4 realization of recurrent neural network from zero
Reptile exercises (1)
Role of asemi rectifier module mdq100-16 in intelligent switching power supply
SQL中HAVING和WHERE的区别
JUC learning record (2022.4.22)
Comparaison du menu de l'illustrateur Adobe en chinois et en anglais
How to design a good API interface?
PSYNC synchronization of redis source code analysis
分享3个使用工具,在家剪辑5个作品挣了400多
JS -- realize click Copy function
thinkphp5+数据大屏展示效果