[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Java Date datatype.Y2000 compliant ?

Posted on 1998-03-20
2
Medium Priority
?
210 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 100 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
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 …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Suggested Courses
Course of the Month17 days, 22 hours left to enroll

830 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