#6960 closed defect (fixed)
Day of Year returns different value on same day
Reported by: | Owned by: | Adam Peller | |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Date | Version: | 1.1.1 |
Keywords: | day of year | Cc: | mde@…, Bryan Forbes |
Blocked By: | Blocking: |
Description
call to dojo.date.locale._getDayOfYear(new Date()) returns different value before 1pm EDT due to rounding. This could be resolved by returning Math.ceil(delta) from dojo.date.difference(). see attached
Attachments (1)
Change History (5)
Changed 11 years ago by
Attachment: | day of year.png added |
---|
comment:1 Changed 11 years ago by
Cc: | jerjoham@… removed |
---|---|
Component: | General → Date |
Owner: | changed from anonymous to Adam Peller |
Reporter: | changed from guest to jerjoham@… |
comment:2 Changed 11 years ago by
Cc: | mde@… Bryan Forbes added |
---|---|
Milestone: | → 1.2 |
comment:3 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 11 years ago by
Matthew reminded me that sometimes it's perfectly reasonable to round (2 hours 59 minutes might as well be 3 hours) We could have used round or parseInt (truncate, to accomodate negative numbers) but at least we documented our choice properly.
Note: See
TracTickets for help on using
tickets.
Math.floor, I think? Hrm. Why round instead of floor? And what might we break with this change?