tp knotts

Greenhorn
+ Follow
since Feb 01, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by tp knotts

Help please!
According to ISO, http://www.phys.uu.nl/~vgent/calendar/isocalendar.htm, Jan 26th should be week 4 of 2010 for DateFormat ww.
However, when I run the following, I get week 5:

String myStrDate = "01/26/2010";
DateFormat df = new SimpleDateFormat("MM/dd/yyyy");
Date myDate = df.parse(myStrDate);
String weekday = new SimpleDateFormat("EEE").format(myDate);
String ww = new SimpleDateFormat("ww").format(myDate);
System.out.print(myDate + "\n" + weekday + "\n" + ww);
14 years ago