You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "linda skrocki (JIRA)" <no...@atlassian.com> on 2007/07/31 23:18:25 UTC
[Roller-JIRA] Reopened: (ROL-1312) Calendar days off by one in
non-English calendar
[ http://opensource.atlassian.com/projects/roller/browse/ROL-1312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
linda skrocki reopened ROL-1312:
--------------------------------
Still seems to be a problem in 4.0
ls
> Calendar days off by one in non-English calendar
> ------------------------------------------------
>
> Key: ROL-1312
> URL: http://opensource.atlassian.com/projects/roller/browse/ROL-1312
> Project: Roller
> Issue Type: Bug
> Affects Versions: 3.1
> Reporter: Anil Gangolli
> Assignee: Anil Gangolli
> Priority: Minor
> Fix For: 3.1
>
> Attachments: rol-1312.patch
>
>
> Apparently caused by the fix to ROL-528 and no corresponding adjustment to the calendar tag code.
> --------------------- Email excerpts
> From: Thomas Hofmann
> Hi, found the codepiece.
> Fact : First day of week in America = Sunday
> First day of week in Europe = Monday
> This looks fine, so I think the days (1-xx) printed into the calendar
> matrix are not aligned correctly.
>
> /**
> * Helper method to build the names of the weekdays. This
> * used to take place in the <code>CalendarTag</code> constructor,
> * but there, <code>mLocale</code> doesn't have the correct value yet.
> */
> private void buildDayNames() {
> // build array of names of days of week
> mDayNames = new String[7];
> Calendar dayNameCal = Calendar.getInstance(mLocale);
> SimpleDateFormat dayFormatter = new SimpleDateFormat("EEE",
> mLocale);
> dayNameCal.set(Calendar.DAY_OF_WEEK,
> dayNameCal.getFirstDayOfWeek());
> for (int dnum = 0; dnum < 7; dnum++) {
> mDayNames[dnum] = dayFormatter.format(dayNameCal.getTime());
> dayNameCal.add(Calendar.DATE, 1);
> }
> }
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Thomas Hofmann
> <Er...@sanofipasteur.com> schrieb am 05/12/2006 15:05:28:
> > Same thing with French.
> > I've looked for a while, and i think it directly comes from the JDK
> > classes...
> >
> > -----Message d'origine-----
> > De : Thomas-W Hofmann [mailto:thomas-w.hofmann@db.com]
> > Envoyé : mardi 5 décembre 2006 15:03
> > À : roller-user@incubator.apache.org
> > Objet : BUG : : Re: 3.1 RC1 Calendar problem
> >
> > When Locale in Weblog is set to "German" , The listed days start
> > with Monday (ie. german abbrev. Mo) when locale is set to "English"
> > the listed days start with Sunday (Sun)
> >
> > I think this is a bug
> >
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/roller/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira