Ravitheja
Ravitheja

Reputation: 781

how to get next day of current date in a MonthDisplayHelper in android?

i have a monthdisplayhelper to display the month, i want to select days between two date. i.e.,if i selected 2nd July and 9th July, all the dates(3rd to 8th) in between these dates must be selected or highlighted.

Upvotes: 0

Views: 2691

Answers (2)

Amanni
Amanni

Reputation: 1934

If you know how many days you will need then you could have a loop basically add days and store in a list

Upvotes: 0

Frank Leigh
Frank Leigh

Reputation: 5382

You can use the Calendar class. Initialise a new Calendar object for your initial date, then use [calendar instance].add(Calendar.DAY_OF_YEAR, 1) to increment the date by 1 day, it'll automatically roll to the next month if required.

Calendar reference: http://developer.android.com/reference/java/util/Calendar.html

Upvotes: 2

Related Questions