mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Date tests: Fix first day of week calculation for non latin locales
This commit is contained in:
parent
9fdefeecb9
commit
f646ba97a9
@ -9,10 +9,10 @@ return $.extend( helper, {
|
||||
getAttributes: function( locale ) {
|
||||
var globalize = new Globalize( locale ),
|
||||
weekdayShortFormatter = globalize.dateFormatter( { raw: "EEEEEE" } ),
|
||||
weekdayNarrowFormatter = globalize.dateFormatter( { raw: "EEEEE" } );
|
||||
firstDayRaw = globalize.dateFormatter( { raw: "c" } )( new Date( 1970, 0, 3 ) );
|
||||
|
||||
return {
|
||||
firstDay: ( 6 - globalize.dateFormatter( { raw: "c" } )( new Date( 1970, 0, 3 ) ) + 1 ),
|
||||
firstDay: ( 7 - globalize.parseNumber( firstDayRaw ) ),
|
||||
formatWeekdayShort: function( date ) {
|
||||
|
||||
// Return the short weekday if its length is < 3. Otherwise, its narrow form.
|
||||
|
Loading…
Reference in New Issue
Block a user