Hello,
almost all methods of Date class are deprecated. So what I need is: get the actual date, get the number of the days in a month (July has 31 days) and get the day of the week of the 1st of the month (july 1st was Thurday, so I need a number like 5; in fat Sunday=1, Tuesday=2,..... ..thurday=5). This is straightfoward with Calendar; I'm asking if it's possibile get it with just Date (and don't use the deprecated methods).
thanks
almost all methods of Date class are deprecated. So what I need is: get the actual date, get the number of the days in a month (July has 31 days) and get the day of the week of the 1st of the month (july 1st was Thurday, so I need a number like 5; in fat Sunday=1, Tuesday=2,..... ..thurday=5). This is straightfoward with Calendar; I'm asking if it's possibile get it with just Date (and don't use the deprecated methods).
thanks
Code:
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
Date date = new Date();