tech
Friday, October 03, 2008
What's wrong with this Java code?
//returns a date that is
before today
public static Date getBackDate(int numDays) {
Date date = new Date();
date.setTime(date.getTime()-numDays*24*60*60*1000);
return date;
}
1 comment:
Anonymous said...
Define: "wrong".
5:09 AM
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
1 comment:
Define: "wrong".
Post a Comment