How to get day of the month?

后端 未结 9 1670
南笙
南笙 2020-11-30 05:48

I am trying to retrieve which day of the month it is.

Such as today is August 29,2011.

What i would like to do is just get the days number such as 29, or 30.

9条回答
  •  再見小時候
    2020-11-30 06:01

    Take a look at GregorianCalendar, something like:

    final Calendar now = GregorianCalendar.getInstance()
    final int dayNumber = now.get(Calendar.DAY_OF_MONTH);
    

提交回复
热议问题