Solved

Java Date datatype.Y2000 compliant ?

Posted on 1998-03-20
2
173 Views
Last Modified: 2010-04-16
Concerning the java datatype "Date" : Does the current JDKs provide a way to support 4 digits (to be Y2000 compliant) ? What are the plans for the next JDKs release ?
0
Comment
Question by:ta
2 Comments
 

Author Comment

by:ta
ID: 1233708
Edited text of question
0
 
LVL 16

Accepted Solution

by:
imladris earned 50 total points
ID: 1233709
The Date class itself doesn't provide input routines. Its design is flawed in a number of ways, in my opinion, mostly due to some quirky argument and result range choices. However, it should have no problem with Y2K stuff. Internally the class counts the number of milliseconds since Jan 1st, 1970. So that will be OK. Argument wise the year is specced as the number of years since 1900. So for the year 2001, the argument will simply be 101. How that is input w.r.t. the user is up to you.

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now