A simple question I hope. How can I compare the date entered into a DatePicker to the current Calendar date?
To explain, If I have the DatePicker date stored as a string, how could I compare that to the current date on the android system calendar?
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.dpresult);
textView1 = (TextView)findViewById(R.id.textView1);
button1 = (Button)findViewById(R.id.button1);
button1.setOnClickListener(new OnClickListener(){
public void onClick(View v){
Intent intent = new Intent(datePickerResult.this, calander.class);
startActivity(intent);
}
});
Bundle extras = getIntent().getExtras();
year = extras.getInt("year");
day = extras.getInt("day");
month = extras.getInt("month");
textView1.setText(day+"");
} }