摘要: public static void main(String[] args) { Calendar calender=Calendar.getInstance(); calender.add(Calendar.DATE,-1); System.out.println("现在时间是"+calender.getTime()); } 阅读全文
posted @ 2016-12-09 18:57 那一年的我们 阅读(232) 评论(0) 推荐(0)
摘要: Calendar calendar=Calendar.getInstance(); calendar.set(2016,11,1);//实际Calendar对象所表示的时间为2.16.12月 char[] title={'日','一','二','三','四','五','六'}; int daysAr 阅读全文
posted @ 2016-12-09 11:18 那一年的我们 阅读(633) 评论(0) 推荐(0)
摘要: - 如何取得年月日、小时分钟秒? - 如何取得从1970年1月1日0时0分0秒到现在的毫秒数? - 如何取得某月的最后一天? - 如何格式化日期? package com.xing.test; import java.text.SimpleDateFormat; import java.util.C 阅读全文
posted @ 2016-12-09 10:08 那一年的我们 阅读(243) 评论(0) 推荐(0)