dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: Enable use of stylelint-config-wikimedia and make pass
[lhc/web/wiklou.git]
/
resources
/
src
/
mediawiki.widgets.datetime
/
ProlepticGregorianDateTimeFormatter.js
diff --git
a/resources/src/mediawiki.widgets.datetime/ProlepticGregorianDateTimeFormatter.js
b/resources/src/mediawiki.widgets.datetime/ProlepticGregorianDateTimeFormatter.js
index
9e9b15f
..
877edba
100644
(file)
--- a/
resources/src/mediawiki.widgets.datetime/ProlepticGregorianDateTimeFormatter.js
+++ b/
resources/src/mediawiki.widgets.datetime/ProlepticGregorianDateTimeFormatter.js
@@
-2,7
+2,7
@@
/**
* Provides various methods needed for formatting dates and times. This
/**
* Provides various methods needed for formatting dates and times. This
- * implementation implments the proleptic Gregorian calendar over years
+ * implementation impl
e
ments the proleptic Gregorian calendar over years
* 0000–9999.
*
* @class
* 0000–9999.
*
* @class
@@
-282,6
+282,7
@@
case 'year|0':
spec = {
component: 'year',
case 'year|0':
spec = {
component: 'year',
+ calendarComponent: true,
type: 'number',
size: 4,
zeropad: params[ 0 ] === '0'
type: 'number',
size: 4,
zeropad: params[ 0 ] === '0'
@@
-292,6
+293,7
@@
case 'month|full':
spec = {
component: 'month',
case 'month|full':
spec = {
component: 'month',
+ calendarComponent: true,
type: 'string',
values: params[ 0 ] === 'short' ? this.shortMonthNames : this.fullMonthNames
};
type: 'string',
values: params[ 0 ] === 'short' ? this.shortMonthNames : this.fullMonthNames
};
@@
-301,6
+303,7
@@
case 'dow|full':
spec = {
component: 'dow',
case 'dow|full':
spec = {
component: 'dow',
+ calendarComponent: true,
editable: false,
type: 'string',
values: params[ 0 ] === 'short' ? this.shortDayNames : this.fullDayNames
editable: false,
type: 'string',
values: params[ 0 ] === 'short' ? this.shortDayNames : this.fullDayNames
@@
-311,6
+314,15
@@
case 'month|0':
case 'day|#':
case 'day|0':
case 'month|0':
case 'day|#':
case 'day|0':
+ spec = {
+ component: tag,
+ calendarComponent: true,
+ type: 'number',
+ size: 2,
+ zeropad: params[ 0 ] === '0'
+ };
+ break;
+
case 'hour|#':
case 'hour|0':
case 'minute|#':
case 'hour|#':
case 'hour|0':
case 'minute|#':
@@
-319,6
+331,7
@@
case 'second|0':
spec = {
component: tag,
case 'second|0':
spec = {
component: tag,
+ calendarComponent: false,
type: 'number',
size: 2,
zeropad: params[ 0 ] === '0'
type: 'number',
size: 2,
zeropad: params[ 0 ] === '0'
@@
-329,6
+342,7
@@
case 'hour|012':
spec = {
component: 'hour12',
case 'hour|012':
spec = {
component: 'hour12',
+ calendarComponent: false,
type: 'number',
size: 2,
zeropad: params[ 0 ] === '012'
type: 'number',
size: 2,
zeropad: params[ 0 ] === '012'
@@
-338,6
+352,7
@@
case 'hour|period':
spec = {
component: 'hour12period',
case 'hour|period':
spec = {
component: 'hour12period',
+ calendarComponent: false,
type: 'boolean',
values: this.hour12Periods
};
type: 'boolean',
values: this.hour12Periods
};
@@
-347,6
+362,7
@@
case 'millisecond|0':
spec = {
component: 'millisecond',
case 'millisecond|0':
spec = {
component: 'millisecond',
+ calendarComponent: false,
type: 'number',
size: 3,
zeropad: params[ 0 ] === '0'
type: 'number',
size: 3,
zeropad: params[ 0 ] === '0'