import java.time.LocalDateTime;
public class MyDate {
private int day,month,year;
public MyDate(int day, int month, int year) {
this.day = day;
this.month = month;
this.year = year;
}
public MyDate() {
this.day = 1;
this.month = 1;
this.year = 2000;
}
public int getDay() {
return day;
}
public void setDay(int day) {
this.day = day;
}
public int getMonth() {
return month;
}
public void setMonth(int month) {
this.month = month;
}
public int getYear() {
return year;
}
public void setYear(int year) {
this.year = year;
}
public String toString(){
String str = "";
str += "Date : "+day+"/"+month+"/"+year;
return str;
}
public MyDate now(){
LocalDateTime t1 = LocalDateTime.now();
int y1 = t1.getYear();
int m1 = t1.getMonthValue();
int d1 = t1.getDayOfMonth();
MyDate retDate = new MyDate(d1, m1, y1);
return retDate;
}
}