gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.52k stars 373 forks source link

DateTimeFormat Pattern for ISO 8601 week number #4010

Open dankurka opened 9 years ago

dankurka commented 9 years ago

Originally reported on Google Code with ID 4009

GWT has by Version 1.6 no means to get an ISO 8601 week number out of a Date.

I would like to have the following:

  DateTimeFormat.getFormat("W").format(date);

Which should return the number of the week in the year according to ISO 8601.
For the current week this would be 36 (today is September the 2nd).

thx

Reported by nebenmir on 2009-09-02 09:18:48

dankurka commented 9 years ago
I'm working on adding this feature.

Reported by rice+legacy@google.com on 2009-09-15 15:39:24

dankurka commented 9 years ago

Reported by rice@google.com on 2009-12-22 16:53:38

dankurka commented 9 years ago
It would be a great feature, and the DatePicker could then display the week number.

Reported by pgtaboada on 2010-01-21 06:57:38

dankurka commented 9 years ago

Reported by jat@google.com on 2011-01-25 20:58:19

dankurka commented 9 years ago
see: https://groups.google.com/d/msg/Google-Web-Toolkit/15XXIsPI4Zc/AGm-vcBZQKUJ

Reported by dankurka@google.com on 2013-06-09 11:04:47

dankurka commented 9 years ago
As far as i can see "hey this issue still exists in GWT 2.5.1" :)

Reported by schteff on 2013-06-10 08:45:29

dankurka commented 9 years ago
"AssumedStale" is an attempt to clean up old bugs that nobody cares about and/or nobody
is doing anything about.  It has been 4 years, so it doesn't seem too important.

However, it also doesn't look that hard -- here is some JS to calculate the week number:
  http://stackoverflow.com/a/6117889

I'll add it as part of the i18n rewrite.

Reported by jat@jaet.org on 2013-06-10 17:16:55