当前位置:网站首页>Get first and last days by year
Get first and last days by year
2022-06-23 17:04:00 【susu1083018911】
/**
* Get the first day of a year
* @param year year
* @return Date
*/
public Date getFirstOfYear(int year){
Calendar calendar = Calendar.getInstance();
calendar.clear();
calendar.set(Calendar.YEAR, year);
return calendar.getTime();
}
/**
* Get the date of the last day of a year
* @param year year
* @return Date
*/
public Date getLastOfYear(int year){
Calendar calendar = Calendar.getInstance();
calendar.clear();
calendar.set(Calendar.YEAR, year);
calendar.roll(Calendar.DAY_OF_YEAR, -1);
return calendar.getTime();
}边栏推荐
- 华为手机通过adb安装APK提示“签名不一致,该应用可能已被修改”
- The evolution of social structure and capital system brought about by the yuan universe
- 以 27K 成功入职字节跳动,这份《 软件测试面试笔记》让我受益终身
- 供求两端的对接将不再是依靠互联网时代的平台和中心来实现的
- Mathematical analysis_ Certification_ Chapter 1: the union of countable sets is countable
- leetcode:30. Concatenate substrings of all words [counter matching + pruning]
- ABP framework - data access infrastructure (Part 2)
- Opengauss database source code analysis series articles -- detailed explanation of dense equivalent query technology (Part 1)
- Lamp architecture that your girlfriend can read
- 短视频平台开发,点击输入框时自动弹出软键盘
猜你喜欢

以 27K 成功入职字节跳动,这份《 软件测试面试笔记》让我受益终身

What can the accelerated implementation of digital economy bring to SMEs?

Intel arc A380 graphics card message summary: the entry-level price products of running point and bright driving need to be optimized

Rongyun: let the bank go to the "cloud" easily

EasyPlayer移动端播放webrtc协议时长按播放页面无法关闭“关于我们”页面

How to use SQL window functions

Jetpack Compose 与 Material You 常见问题解答
![Leetcode: question d'entrevue 08.13. Empiler la boîte [DFS en haut + mémoire ou tri en bas + DP]](/img/22/220e802da7543c2b14b7057e4458b7.png)
Leetcode: question d'entrevue 08.13. Empiler la boîte [DFS en haut + mémoire ou tri en bas + DP]

Leetcode 450. Delete node in binary search tree

【解决】npm WARN config global `--global`, `--local` are deprecated. Use `--location=global`
随机推荐
读书郎通过上市聆讯:平板业务毛利率走低,2021年利润同比下滑11%
The connection between supply and demand will no longer depend on the platform and center of the Internet Era
Three minutes to learn how to retrieve the MySQL password
get_ edges
[untitled] Application of laser welding in medical treatment
The company recruited a tester with five years' experience and saw the real test ceiling
Golang write file code example
Right leg drive circuit principle? ECG acquisition is a must, with simulation files!
Leetcode: question d'entrevue 08.13. Empiler la boîte [DFS en haut + mémoire ou tri en bas + DP]
Asemi ultrafast recovery diode es1j parameters, es1j package, es1j specification
你女朋友也能读懂的LAMP架构
stylegan3:alias-free generative adversarial networks
Reading and writing JSON files by golang
如何选择券商?手机开户安全么?
Huawei mobile phones install APK through ADB and prompt "the signature is inconsistent. The application may have been modified."
What is an abstract class? How to define abstract classes?
Jmeter压力测试教程
Stick to five things to get you out of your confusion
VGg download (.Net file and imagenet-vgg-verydeep-19)
Spdlog logging example - create a logger using sink