《java的时间操作》word版

《java的时间操作》word版

ID:22689040

大小:100.51 KB

页数:16页

时间:2018-10-30

《java的时间操作》word版_第1页
《java的时间操作》word版_第2页
《java的时间操作》word版_第3页
《java的时间操作》word版_第4页
《java的时间操作》word版_第5页
资源描述:

《《java的时间操作》word版》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库

1、本资料由-大学生创业

2、创业

3、创业网http://www.chuangyw.com/提供资料java的时间操作2008年02月01日星期五11:12/**日期类*@date2003-12-04*@version1.0*/importjava.util.*;importjava.text.*;importjava.util.Calendar;publicclassVeDate{/***获取现在时间**@return返回时间类型yyyy-MM-ddHH:mm:ss*/publicstaticDategetNowDate(){DatecurrentTime=newDate

4、();SimpleDateFormatformatter=newSimpleDateFormat("yyyy-MM-ddHH:mm:ss");StringdateString=formatter.format(currentTime);ParsePositionpos=newParsePosition(8);DatecurrentTime_2=formatter.parse(dateString,pos);returncurrentTime_2;}/***获取现在时间**@return返回短时间格式yyyy-MM-dd*/publicstaticDategetNo

5、wDateShort(){DatecurrentTime=newDate();SimpleDateFormatformatter=newSimpleDateFormat("yyyy-MM-dd");StringdateString=formatter.format(currentTime);ParsePositionpos=newParsePosition(8);DatecurrentTime_2=formatter.parse(dateString,pos);returncurrentTime_2;}/***获取现在时间*在线代理

6、网页代理

7、代理网页

8、http:

9、//www.dailiav.com减肥药排行榜

10、淘宝最好的减肥药

11、什么减肥药效果最好

12、减肥瘦身药

13、http://pigproxy.cn本资料由-大学生创业

14、创业

15、创业网http://www.chuangyw.com/提供资料*@return返回字符串格式yyyy-MM-ddHH:mm:ss*/publicstaticStringgetStringDate(){DatecurrentTime=newDate();SimpleDateFormatformatter=newSimpleDateFormat("yyyy-MM-ddHH:mm:ss");Stringdate

16、String=formatter.format(currentTime);returndateString;}/***获取现在时间**@return返回短时间字符串格式yyyy-MM-dd*/publicstaticStringgetStringDateShort(){DatecurrentTime=newDate();SimpleDateFormatformatter=newSimpleDateFormat("yyyy-MM-dd");StringdateString=formatter.format(currentTime);returndateString;

17、}/***获取时间小时:分;秒HH:mm:ss**@return*/publicstaticStringgetTimeShort(){SimpleDateFormatformatter=newSimpleDateFormat("HH:mm:ss");DatecurrentTime=newDate();StringdateString=formatter.format(currentTime);returndateString;}/***将长时间格式字符串转换为时间yyyy-MM-ddHH:mm:ss**@paramstrDate*@return*/publicst

18、aticDatestrToDateLong(StringstrDate){SimpleDateFormatformatter=newSimpleDateFormat("yyyy-MM-ddHH:mm:ss");ParsePositionpos=newParsePosition(0);Datestrtodate=formatter.parse(strDate,pos);returnstrtodate;在线代理

19、网页代理

20、代理网页

21、http://www.dailiav.com减肥药排行榜

22、淘宝最好的减肥药

23、什么减肥药效果最好

24、减肥瘦身药

25、http://pigproxy

26、.cn本资

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。