зеркало из https://github.com/mozilla/gecko-dev.git
Bug 326746 support 'noon' and 'midnight' in the timepicker, r1=lilmatt, r2=mvl
This commit is contained in:
Родитель
470be20cd2
Коммит
63ccc6700f
|
@ -91,6 +91,9 @@ day.7.short=S
|
|||
am-string=AM
|
||||
pm-string=PM
|
||||
|
||||
noon=Noon
|
||||
midnight=Midnight
|
||||
|
||||
AllDay=All Day
|
||||
|
||||
# Added to support localization of messages within eventDialog.js
|
||||
|
|
|
@ -1464,6 +1464,22 @@
|
|||
<parameter name="aValue"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
// Try/catch this, since some people are apparently
|
||||
// interested in using the datepicker in remote apps, where
|
||||
// calGetString wouldn't exist
|
||||
try {
|
||||
var noon = calGetString("dateFormat", "noon");
|
||||
if (aValue.toLowerCase() == noon.toLowerCase()) {
|
||||
return new Date(0, 0, 0, 12, 0, 0, 0);
|
||||
}
|
||||
|
||||
var midnight = calGetString("dateFormat", "midnight");
|
||||
if (aValue.toLowerCase() == midnight.toLowerCase()) {
|
||||
return new Date(0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
} catch(ex) {
|
||||
}
|
||||
|
||||
var time = null;
|
||||
var timePartsArray = this.parseTimeRegExp.exec(aValue);
|
||||
const PRE_INDEX=1, HR_INDEX=2, MIN_INDEX=4, SEC_INDEX=6, POST_INDEX=8;
|
||||
|
|
Загрузка…
Ссылка в новой задаче