How to get start and end date for a specific month and year

前端 未结 3 1246
青春惊慌失措
青春惊慌失措 2021-01-24 06:26

I am creating a report in iReport

The user enters a date eg. 2014-09-14

The report then needs to print 2014-09-01 and 2014-09-30

(\"First day of

3条回答
  •  时光取名叫无心
    2021-01-24 07:14

    Try this out:

    Calendar abc = new GregorianCalendar();
    System.out.println(abc.getActualMaximum(Calendar.DAY_OF_MONTH) + " and " + abc.getActualMinimum(Calendar.DAY_OF_MONTH));
    

提交回复
热议问题