| Deutsch English Français Italiano |
|
<66b40d29$0$715$14726298@news.sunsite.dk> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!weretis.net!feeder8.news.weretis.net!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Wed, 7 Aug 2024 20:11:21 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Simple Pascal question Newsgroups: comp.os.vms References: <v8goeh$2b5op$1@dont-email.me> <v8lpj0$ems$1@panix2.panix.com> <v8nrp9$3tp$1@reader1.panix.com> <v8o4h8$2ut3$1@dont-email.me> <v8p58c$gmo$1@reader1.panix.com> <v8p87j$9ptm$3@dont-email.me> <66b3d540$0$715$14726298@news.sunsite.dk> <v90par$3clbn$1@dont-email.me> Content-Language: en-US From: =?UTF-8?Q?Arne_Vajh=C3=B8j?= <arne@vajhoej.dk> In-Reply-To: <v90par$3clbn$1@dont-email.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Lines: 30 Message-ID: <66b40d29$0$715$14726298@news.sunsite.dk> Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: 2dc3abaf.news.sunsite.dk X-Trace: 1723075881 news.sunsite.dk 715 arne@vajhoej.dk/68.14.27.188:56095 X-Complaints-To: staff@sunsite.dk Bytes: 2131 On 8/7/2024 5:35 PM, Lawrence D'Oliveiro wrote: > Dates/times? You have to contend with an API that has accumulated so much > legacy cruft, that you are left with an old class where every single > member is deprecated, yet the class itself is still needed in the newer- > style calls. That is also one of Roland's pet peeves. But it should not be that hard. There are 3 generations of time API in Java: * java.util.Date (Java 1.0) * java.util.Date + java.util.*Calendar + java.text.*DateFormat (Java 1.1 - 1.7) * java.util.time.* (Java 1.8-) But if we look at the second, then the trick is to realize the mapping of functionality. java.util.Date ~ C time_t type and time function java.util.Calendar/GregorianCalendar ~ C mktime/gmtime/localtime java.text.DateFormat/SimpleDateFormat ~ C strftime/strptime Even though all the conversion functionality was moved from Date to Calendar, then Date is still the basic point in time type - the time_t of Java. So it did not go away. Arne