
日期
霤影
你走了,我走了,然后我们散了.........
展开
-
格林威治时间(GMT) 字符串转Date
public static void main(String[] args) throws ParseException { /** * 格林威治时间(GMT) 字符串转Date * 目前只有这种方法可行 * @param strDate Thu May 18 2017 00:00:00 GMT+0800 (中国标准时间) */ String strDate = "Mon, 14 Mar 2022 17:23:26 GMT"; SimpleD.原创 2022-03-28 16:45:46 · 1429 阅读 · 2 评论 -
日期Utils
/** * 获取某年第一天日期 * @param year 年份 * @return Date */ public static Date getYearFirst(String year){ int thisYear =Integer.parseInt(year); Calendar calendar = Calendar.getInstance(); calenda...原创 2019-12-13 13:50:38 · 136 阅读 · 0 评论 -
获取某年某月所有日期
public static void main(String[] args) { List<String> list = getAllMonthDays("2019-10"); for (int i = 0; i < list.size(); i++) { System.out.println(list.get(i)); }...原创 2019-11-26 15:45:58 · 538 阅读 · 0 评论