The day- and month-names can be done in local language taken from your phone/tablet language.
The day- and month-names can be done in local language taken from your phone/tablet language.
One problem: It won’t show 3letter day-names.
Is it my ROM or my language ??
Please try code below and share your result.
EDIT, Specs: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns
]]>« Hello. Please add an option to hide statusbar clock on desktop in System bar section. (Previous Post)
(Next Post) Help with script »
< ![CDATA[
LL.bindClass(“android.text.format.DateFormat”);
var dateFormat = new DateFormat();
var d = new Date();
var Dname = [];
for (var Frm = “E”; Frm < = "EEEEEEE"; Frm += "E"){
var DagF = dateFormat.format(Frm,d);
Dname.push( DagF);
}
alert(Dname);
]]>
< ![CDATA[
My own result, Android v5.1.1 / Dutch.
di,di,di,dinsdag,D,di,di
]]>
< ![CDATA[
The result on an English N7 running 5.1.1 is:
Tue,Tue,Tue,Tuesday,T,Tue,Tue
Seems locale dependant.
]]>
< ![CDATA[
Pierre Hébert English is according specs for me too. Do you happen to have a French device to try?
]]>
< ![CDATA[
hhm no “Tu” ??
]]>
< ![CDATA[
With French and 5.1.1 too, the result is:
mar.,mar.,mar.,mardi,M,mar.,mar.
(notice the dots…)
Not a single “Tu”, nor a “ma”. I guess the only way to have three letters is to use the first three letters of the EEEE format.
]]>
< ![CDATA[
That’s plan_B and question 2:
Are there languages where just taking first 3 letters would be wrong?
]]>
< ![CDATA[
Probably. There’s always an exception somewhere, maybe a name with less than 3 letters, such as in: http://www.cjvlang.com/Dow/dowchin.html
But we can’t handle everything, can we ?
]]>
< ![CDATA[
From Spanish
mar.,mar.,mar.,martes,M,mar.,mar.
]]>
< ![CDATA[
czech:
út,út,út,úterý,Ú,út,út
]]>
< ![CDATA[
German: Di.,Di.,Di.,Dienstag,D,Di.,Di.
]]>
< ![CDATA[
thanks all for your cooperation.
From the look of this, I will take “EEEE” and take 1, 2, 3 or all letters from it.
]]>