Page 1 of 1

About Question enthuware.ocpjp.v8.2.1194 :

Posted: Sun Mar 20, 2016 6:38 am
by javalass
I'm not sure what week-based-year means (the API examples are unclear), but both 'MM/yy' and 'MM/YY' formats print the same when I run them:

Code: Select all

        SimpleDateFormat normalYear = new SimpleDateFormat("MM/YY", Locale.US);
        SimpleDateFormat weekYear = new SimpleDateFormat("MM/yy", Locale.US);
        Date date = new Date();
        System.out.println(normalYear.format(date));//prints 03/16
        System.out.println(weekYear.format(date));//prints 03/16

Re: About Question enthuware.ocpjp.v8.2.1194 :

Posted: Sun Mar 20, 2016 9:33 pm
by admin

Re: About Question enthuware.ocpjp.v8.2.1194 :

Posted: Mon Mar 21, 2016 3:37 am
by javalass
Ah, ok. Not something I'd ever use, I don't think. But at least I know the difference now.

Thank you so much for that, Paul.