Solved

Java Date datatype.Y2000 compliant ?

Posted on 1998-03-20
2
197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

724 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