java - How to compare user selected date with from and to date in Android? -
this question has answer here:
- how compare dates in java? 11 answers
i want compare user selected date date , date. e.g.,
from date : 2017-25-07 date : 2017-31-07 selected date : 2017-27-07
so want check selected date in range between date , date.
you can compare 3 dates below code
if(!fromdate.after(selecteddate) && !todate.before(selecteddate)) { //fromdate <= selecteddate <= todate }
Comments
Post a Comment