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

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

javascript - Which segment of a polyline was clicked? -

c# - Avoiding duplicate methods for Task and Task<T> -