It seems that the Date class itself is not intended to be precluded, but rather to have been precluded from generators and methods that are not suitable for multinational use.
On Android, Date was almost Deferred after API1 To replace Date, the basic method of Date is almost It is provided by Calendar class.
int getDate() method is Calendar.get(Calendar.DATE)
The getDay() method is Calendar.get(Calendar.DAY_OF_WEEK)
The int getHours() method is Calendar.get(Calendar.HOUR_OF_DAY)
The int getMinutes() method is Calendar.get(Calendar.MINUTE)
The int getMonth() method is called Calendar.get(Calendar.MONTH)
Use the int getSeconds() method instead of Calendar.get(Calendar.SECOND).
You can also use Calendar's set method for the set~~() method.
void setDate() -> Calendar.set(Calendar.DATE, day)
If you disable it just because it is defined
, it will affect programs that have already been distributed and are being serviced.
Even if a new function appears in a new version, the existing one should be available.
© 2024 OneMinuteCode. All rights reserved.