java - How to compare user selected date with from and to date in Android? -


this question has answer here:

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

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -