Problem showing months in Spanish

745 views
Skip to first unread message

Ivan San José García

unread,
Aug 17, 2010, 2:50:47 AM8/17/10
to play-fr...@googlegroups.com
Hi, I use since() JavaExtension, and in English, all months begin with
first letter in uppercase. But, in spanish the first letter is in
lowercase. Why?

After see JavaExtensions.java source code, I think is a issue of
java.text.SimpleDateFormat. Anyone knows how to solve it?

Peter Hilton, Lunatech

unread,
Aug 17, 2010, 6:17:40 AM8/17/10
to play-framework
That's odd. If I put ${new Date().format('MMMM', 'es')} in my
template, it outputs 'agosto' in lower-case.

Please could you post the code you're using.

Ivan San José García

unread,
Aug 17, 2010, 6:32:20 AM8/17/10
to play-fr...@googlegroups.com
Yes, this is the problem, the first letter of months should be in uppercase.

2010/8/17 Peter Hilton, Lunatech <peter....@gmail.com>:


> That's odd. If I put ${new Date().format('MMMM', 'es')} in my
> template, it outputs 'agosto' in lower-case.
>
> Please could you post the code you're using.
>

> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>

richiethom

unread,
Aug 17, 2010, 2:31:20 PM8/17/10
to play-framework
I am not a Spanish speaker, so sorry if this is a stupid question, but
are you absolutely certain that official, correct Spanish requires
upper case month names? French doesn't, but English does - could it be
that "agosto" is correct? The following real Java code:

final Locale spain = new Locale("es", "ES");
final Locale france = new Locale("fr", "FR");
final Locale uk = new Locale("en", "GB");
final DateFormat spainDateInstance =
SimpleDateFormat.getDateInstance(DateFormat.LONG, spain);
final DateFormat franceDateInstance =
SimpleDateFormat.getDateInstance(DateFormat.LONG, france);
final DateFormat ukDateInstance =
SimpleDateFormat.getDateInstance(DateFormat.LONG, uk);
System.out.println(spainDateInstance.format(new Date()));
System.out.println(franceDateInstance.format(new Date()));
System.out.println(ukDateInstance.format(new Date()));

produces:
17 de agosto de 2010
17 août 2010
17 August 2010





On Aug 17, 12:32 pm, Ivan San José García <ivan...@gmail.com> wrote:
> Yes, this is the problem, the first letter of months should be in uppercase.
>
> 2010/8/17 Peter Hilton, Lunatech <peter.hil...@gmail.com>:

Ivan San José García

unread,
Aug 17, 2010, 3:51:02 PM8/17/10
to play-fr...@googlegroups.com
Incredible, I'm spanish, and I was looking for any rule that confirm
this. In this webpage (in spanish):
http://buscon.rae.es/dpdI/SrvltConsulta?lema=may%C3%BAsculas , in
point 6.1 confirm that the first letter of months should be in
lowercase, unless required due to punctuation signs.

All my life I wrote months and days always with first letter in
uppercase. I feel really stupid :)

Sorry for this thread. All is ok.

2010/8/17 richiethom <richi...@gmail.com>:

richiethom

unread,
Aug 17, 2010, 4:39:31 PM8/17/10
to play-framework
No problem!! Just goes to prove that computers are always right :P

On Aug 17, 9:51 pm, Ivan San José García <ivan...@gmail.com> wrote:
> Incredible, I'm spanish, and I was looking for any rule that confirm
> this. In this webpage (in spanish):http://buscon.rae.es/dpdI/SrvltConsulta?lema=may%C3%BAsculas, in
> point 6.1 confirm that the first letter of months should be in
> lowercase, unless required due to punctuation signs.
>
> All my life I wrote months and days always with first letter in
> uppercase.  I feel really stupid :)
>
> Sorry for this thread. All is ok.
>
> 2010/8/17 richiethom <richiet...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages