Skip to main content

Search and Top Navigation

#8325 closed bug (notabug)

Opened May 15, 2012 02:44PM UTC

Closed May 15, 2012 02:59PM UTC

Last modified May 15, 2012 03:00PM UTC

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:
Description

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

Attachments (0)
Change History (5)

Changed May 15, 2012 02:47PM UTC by scottgonzalez comment:1

owner: → 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?

Changed May 15, 2012 02:50PM UTC by darrencperry comment:2

status: pendingnew

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

Changed May 15, 2012 02:50PM UTC by darrencperry comment:3

typo in initial post:

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

Changed May 15, 2012 02:59PM UTC by scottgonzalez comment:4

resolution: → invalid
status: newclosed

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

Changed May 15, 2012 03:00PM UTC by darrencperry comment:5

Ok sorry.

Silly mistake.

Should be using getDay instead of getUTCDay.