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.
581 PHP ssh2_scp_send fails to send files as intended
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
578 Understanding How to Configure Google API Key
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.