Re: What is standard way to manage with the date object in the web based applications?
Wednesday, February 6, 2002 09:32 AM
Im working on a project right now that uses Strings to represent Date objects and it is not working out too well for us. You will find you will have to write lots of converstion and logic type methods and you string format will be unique to you. Much better to use the getTime() method of Date and use a long, the long value is the number of milliseconds since 12AM Jan 1st 1970 so it is easy to perform transforation on this long value (want to add a day, add 1000 * 60 * 60 * 24).
Also you might notice that in the API ref the Date(long) constructor is the only one not deprecated (except obvious the default one)