Hello,
Welcome to Microsoft Q&A!
LocalDate
is not available in Xamarin.Android , as Android suggested ,we could use Calendar
class to replace Date
class .
As of JDK 1.1, the Calendar class should be used to convert between dates and time fields and the DateFormat class should be used to format and parse date strings. The corresponding methods in Date are deprecated.
Date(int year, int month, int date)
This constructor is deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date)
or GregorianCalendar(year + 1900, month, date)
.
Date(int year, int month, int date, int hrs, int min)
This constructor is deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min)
or GregorianCalendar(year + 1900, month, date, hrs, min)
.
Date(int year, int month, int date, int hrs, int min, int sec)
This constructor is deprecated. As of JDK version 1.1, replaced by Calendar.set(year + 1900, month, date, hrs, min, sec)
or GregorianCalendar(year + 1900, month, date, hrs, min, sec)
.
Date(String s)
This constructor is deprecated. As of JDK version 1.1, replaced by DateFormat.parse(String s)
.
Best Regards,
Cole Xia
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.