摘要:
Calendar c = Calendar.getInstance();//创建实例 默认是当前时刻 c.get(Calendar.YEAR); c.get(Calendar.MONTH); c.get(Calendar.DATE);//获取年,月,日 当然时分秒也可以 注意这里的月份比较特殊 从0 阅读全文
摘要:
1、取得指定日期是星期几取得指定日期是星期几可以采用下面两种方式取得日期是星期几:a、使用Calendar类//根据日期取得星期几public static String getWeek(Date date){ String[] weeks = {"星期日","星期一","星期二","星期三","星 阅读全文