You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "Anil Gangolli (JIRA)" <ji...@apache.org> on 2008/11/29 00:10:19 UTC

[jira] Resolved: (ROL-1312) Calendar days off by one in non-English calendar

     [ https://issues.apache.org/roller/browse/ROL-1312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anil Gangolli resolved ROL-1312.
--------------------------------

    Resolution: Cannot Reproduce

I'm unable to reproduce the original problem on my build on trunk.  If someone else is, please reopen and provide details about what locale you are using and what you are seeing.

> Calendar days off by one in non-English calendar
> ------------------------------------------------
>
>                 Key: ROL-1312
>                 URL: https://issues.apache.org/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.
-
You can reply to this email to add a comment to the issue online.