java - How to get week of year figure in GWT -


is there simple way how week of year information date object or millis time in gwt on client side?

something this:

date date = new date(); date yearstart = new date(date.getyear(), 0, 0);  int week = (int) (date.gettime() - yearstart.gettime())/(7 * 24 * 60 * 60 * 1000); 

note give week in date object, has no time zone information. when use it, may have adjust using time zone information.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -