hutool获取一个月一年的开始时间,结束时间

    public static void main(String[] args) {

        System.out.println(DateUtil.beginOfYear(new Date()));
        System.out.println(DateUtil.endOfYear(new Date()));
        System.out.println(DateUtil.beginOfMonth(new Date()));
        System.out.println(DateUtil.endOfMonth(new Date()));
            
    }

 

posted @ 2021-01-26 11:31  huanglei2010  阅读(5183)  评论(0)    收藏  举报