Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8325 closed bug (notabug)

getUTCDay is giving different day numbers over british summer time UK

Reported by: darrencperry Owned by: darrencperry
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: 1.8.20
Keywords: Cc:
Blocked by: Blocking:


During British Summer Time (03/25/2012 - 10/29/2012) Sundays are reported as 0 The rest of the time Mondays are reported as 0

$('#datepicker').datepicker('setDate', '10/2/22012').datepicker('getDate').getUTCDay(); Monday is 0

$('#datepicker').datepicker('setDate', '10/29/2012').datepicker('getDate').getUTCDay(); Monday is 1

Change History (5)

comment:1 Changed 7 years ago by Scott González

Owner: set to darrencperry
Status: newpending

getUTCDay() is not part of the datepicker. Are you saying that the datepicker is giving you the wrong date or that getUTCDay() is not returning what you expect given the specific date?

comment:2 Changed 7 years ago by darrencperry

Status: pendingnew

Ok yes, problem is with getUTCDay not dealing with BST/GMT difference...?

comment:3 Changed 7 years ago by darrencperry

typo in initial post: $('#datepicker').datepicker('setDate', '10/22/2012').datepicker('getDate').getUTCDay(); Monday is 0

comment:4 Changed 7 years ago by Scott González

Resolution: invalid
Status: newclosed

If the problem you're experiencing is with getUTCDay() then this is not related to jQuery UI.

comment:5 Changed 7 years ago by darrencperry

Ok sorry.

Silly mistake.

Should be using getDay instead of getUTCDay.

Note: See TracTickets for help on using tickets.