Hi! I'm having trouble when converting dates on the form yyyyww to yyyy-mm-dd (first day of the week). It seems like I'm getting dates that are about a year to early. The code I run look like this:
public String weekToDate(String yyyyww) throws Exception { String ret = null; DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyyww"); DateTime dateTime = fmt.parseDateTime(yyyyww); // find first day of week DateTimeFormatter fmt2 = DateTimeFormat.forPattern("yyyy-MM-dd"); //dateTime = dateTime.minusDays(dateTime.dayOfWeek().get()); return fmt2.print(dateTime); } Is this expected behavior since I convert to a date with higher "resolution" or is it an error in Joda-time. Thanks in advance Roland Heimdahl ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Joda-interest mailing list Joda-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/joda-interest