String strftimedaydatetime definition in Spanish (es)

String strftimedaydatetime definition in Spanish (es)

by Lucas Herraiz -
Number of replies: 3

Hi all

I was working with this string from the "es" language package and I noticed that instead of getting dates in spanish format (dd/mm/yy) I was getting them in a wrong format (dd/mm/aa). So instead of, for example 27/06/15 I am getting 27/06/sab     (sab => sábado ==> saturday in spanish).


I dived in the language pack and I saw that the definition of the string strftimedaydatetime  is %d/%m/%a

and in my opinion, this would be wrong. It should be %d/%m/%y


This string is used as a parameter in the function userdate() from the Moodle library (lib/moodlelib.php). And this function passes that parameter to the function strftime().

If you review the documentation for that php function, the %a means:
             An abbreviated textual representation of the day

In opposite, %y means:
             Two digit representation of the year


So, my proposal would be to modify that string in the spanish translation package.

Would you mind share your opinion with me?


Thanks in advance and sorry if this topic should have been in a different subforum.

Average of ratings: Useful (1)
In reply to Lucas Herraiz

Re: String strftimedaydatetime definition in Spanish (es)

by Germán Valero -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Lucas,

I just checked into AMOS for the strftimedaydatetime definition in langconfig for both Spanish languages (International and Mexican) and both share exactly the same Strings for all Moodle branches 2.0 to 2.9:

%A, %d de %B de %Y, %H:%M

So, I think that the strftimedaydatetime definition in langconfig is OK.

I think that the problem lies in the strftimedatefullshort string definition, which is %d/%m/%y in the original English and in the Mexican Spanish pack, but is %d/%m/%a (as you point out) in the International Spanish pack.

I have sent the suggested fix to the language pack maintainer.

Gracias por la observación. Saludos desde la ciudad de México.

Average of ratings: Useful (2)
In reply to Germán Valero

Re: String strftimedaydatetime definition in Spanish (es)

by Lucas Herraiz -

Hi German,

Thanks a lot for your reply. You are totatlly right. I was describing a potential problem with the strftimedatefullshort string, not the strftimedaydatetime.


Thanks a lot for your support. 

It was great helping Moodle community.


Regads from Spain / Saludos desde España

Lucas

In reply to Lucas Herraiz

Re: String strftimedaydatetime definition in Spanish (es)

by Germán Valero -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Lucas,

The suggested fix has been approved by the international Spanish language maintainer smile

You can update your language pack and see it in  action smile

Saludos,