/**
* Provides various methods needed for formatting dates and times. This
- * implementation implments the proleptic Gregorian calendar over years
+ * implementation implements the proleptic Gregorian calendar over years
* 0000–9999.
*
* @class
config.shortMonthNames = {};
$.each( config.fullMonthNames, function ( k, v ) {
config.shortMonthNames[ k ] = v.substr( 0, 3 );
- }.bind( this ) );
+ } );
}
if ( config.shortDayNames && !config.dayLetters ) {
config.dayLetters = [];
$.each( config.shortDayNames, function ( k, v ) {
config.dayLetters[ k ] = v.substr( 0, 1 );
- }.bind( this ) );
+ } );
}
if ( config.fullDayNames && !config.dayLetters ) {
config.dayLetters = [];
$.each( config.fullDayNames, function ( k, v ) {
config.dayLetters[ k ] = v.substr( 0, 1 );
- }.bind( this ) );
+ } );
}
if ( config.fullDayNames && !config.shortDayNames ) {
config.shortDayNames = {};
$.each( config.fullDayNames, function ( k, v ) {
config.shortDayNames[ k ] = v.substr( 0, 3 );
- }.bind( this ) );
+ } );
}
config = $.extend( {
fullMonthNames: this.constructor.static.fullMonthNames,
case 'year|0':
spec = {
component: 'year',
+ calendarComponent: true,
type: 'number',
size: 4,
zeropad: params[ 0 ] === '0'
case 'month|full':
spec = {
component: 'month',
+ calendarComponent: true,
type: 'string',
values: params[ 0 ] === 'short' ? this.shortMonthNames : this.fullMonthNames
};
case 'dow|full':
spec = {
component: 'dow',
+ calendarComponent: true,
editable: false,
type: 'string',
values: params[ 0 ] === 'short' ? this.shortDayNames : this.fullDayNames
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 'second|0':
spec = {
component: tag,
+ calendarComponent: false,
type: 'number',
size: 2,
zeropad: params[ 0 ] === '0'
case 'hour|012':
spec = {
component: 'hour12',
+ calendarComponent: false,
type: 'number',
size: 2,
zeropad: params[ 0 ] === '012'
case 'hour|period':
spec = {
component: 'hour12period',
+ calendarComponent: false,
type: 'boolean',
values: this.hour12Periods
};
case 'millisecond|0':
spec = {
component: 'millisecond',
+ calendarComponent: false,
type: 'number',
size: 3,
zeropad: params[ 0 ] === '0'