From: Mike H. <th...@bi...> - 2002-02-20 21:53:18
|
Maybe I'm doing something dumb here -- I dunno. I'll honestly admit that I know more about Python than Java . . I'm wanting to emulate something like the time.strpformat in the CPython/Unix library. The closest I've found is the java.text.DateFormat class in the Java standard library. I think I'm using it right, but I get a very strange error: >>> from java.text import DateFormat >>> date 'Wednesday February 20 12:06:17 CST 2002' >>> t = DateFormat.parse(date) Traceback (innermost last): File "<console>", line 1, in ? TypeError: parse(): expected 2-3 args; got 1 According to the Java API docs, DateFormat.parse only requires 1-2 args: parse public Date parse(String text) throws ParseException parse public abstract Date parse(String text, ParsePosition pos) Anyone have any suggestions?? -- mikeh |