Forums Register Login

Depricated Date class

+Pie Number of slices to send: Send
When Date class is depricated and all other classes are extending from date how to get Todays Date w/o calender?
+Pie Number of slices to send: Send
Ajit,
The Date class is depricated because the Calendar class is more general. The answer to your question seems to be that you can't. To get todays date you would use any Calendar subclass (i.e., GregorianCalendar):

Regards,
Manfred.
+Pie Number of slices to send: Send
Just because a class is deprecicated doesn't mean you can't use it, it just means that a better way of doing the same thing was developed, and it will give you a depreciation message when you compile, but the code will still work.
Don't count your weasels before they've popped. And now for a mulberry bush related tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1072 times.
Similar Threads
How to Convert String into Date
Date - problem
what is the meaning of the deprecated in APIs
Date -problem
using calendar as a date type
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 09:52:02.