int y = Integer.parseInt(String.valueOf(year));
int m = Integer.parseInt(String.valueOf(monthOfYear+1));
int d = Integer.parseInt(String.valueOf(dayOfMonth));
if(y > currentYear)
{
Toast.makeText(SleepView.this, "Please select proper date.", Toast.LENGTH_LONG).show();
}
else if(m > currentMonth && y == currentYear)
{
Toast.makeText(SleepView.this, "Please select proper date.", Toast.LENGTH_LONG).show();
}
else if(d > currentDay && y == currentYear&& m == currentMonth)
{
Toast.makeText(SleepView.this, "Please select proper date.", Toast.LENGTH_LONG).show();
}
int m = Integer.parseInt(String.valueOf(monthOfYear+1));
int d = Integer.parseInt(String.valueOf(dayOfMonth));
if(y > currentYear)
{
Toast.makeText(SleepView.this, "Please select proper date.", Toast.LENGTH_LONG).show();
}
else if(m > currentMonth && y == currentYear)
{
Toast.makeText(SleepView.this, "Please select proper date.", Toast.LENGTH_LONG).show();
}
else if(d > currentDay && y == currentYear&& m == currentMonth)
{
Toast.makeText(SleepView.this, "Please select proper date.", Toast.LENGTH_LONG).show();
}
No comments:
Post a Comment