![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
DATA & TIME
袁忠
这个作者很懒,什么都没留下…
展开
-
JAVA 获取当前/指定月的最大天数
当前月则vCalendar cal = Calendar.getInstance();cal.set( y, m, 1 );int max = cal.getMaximum(Calendar.DAY_OF_MONTH);原创 2014-10-12 15:31:49 · 2457 阅读 · 2 评论 -
JAVA获取某段时间内的所有日期
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. *//** * * @aut转载 2014-10-12 15:22:48 · 381 阅读 · 0 评论 -
java得到当月天数
1.使用calendar类实现 /** * 取得当月天数 * */ public static int getCurrentMonthLastDay() { Calendar a = Calendar.getInstance(); a.set(Calendar.DATE, 1);//把日期设置为当月第一天 a.roll(Calendar.DATE, -1);转载 2014-10-12 15:14:58 · 299 阅读 · 0 评论