]> source.dussan.org Git - vaadin-framework.git/commit
Fixed incorrect week numbers in DateField (#14437)
authorTeemu Pöntelin <teemu@vaadin.com>
Sun, 17 Aug 2014 20:24:28 +0000 (23:24 +0300)
committerSauli Tähkäpää <sauli@vaadin.com>
Fri, 12 Sep 2014 08:10:40 +0000 (11:10 +0300)
commit74460ffcd165f921cae03a86eaf3117501af03eb
tree3eea755b4809c35fbfacdea63438152c4e3a26ea
parent2826f64abe713ffc277210f627092fbdd3cd9e27
Fixed incorrect week numbers in DateField (#14437)

Daylight saving time caused problems with the week number calculation
in the DateTimeService.getISOWeekNumber(Date d) method. If the given
date was inside a DST period, there was a rounding error when calculating
the number of days from the beginning of the year. As a result the week
numbers were calculated incorrectly in a case where the year started with
a Thursday (like for example 2015 and 2026).

Change-Id: Ib3d045ea0b9a1acc44b6f28487b064b3c2b76bb9
client/src/com/vaadin/client/DateTimeService.java
client/tests/src/com/vaadin/client/DateTimeServiceTest.java