Back to project page CommonLibs.
The source code is released under:
Apache License
If you think the Android project CommonLibs listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.alex.common.utils; /* w w w . ja v a 2 s . c o m*/ import java.util.Calendar; import java.util.Date; public class DateTimeUtils { /*-------------------------- * ??? *-------------------------*/ /*-------------------------- * ????? *-------------------------*/ /*-------------------------- * ???????? *-------------------------*/ /*-------------------------- * public?? *-------------------------*/ /** * ?Date???????? * @return ?? */ public static int getWeekOfDate(Date dt) { Calendar cal = Calendar.getInstance(); cal.setTime(dt); int w = cal.get(Calendar.DAY_OF_WEEK); return w; } /*-------------------------- * protected??packet?? *-------------------------*/ /*-------------------------- * private?? *-------------------------*/ }