时间的获取
来源:互联网 发布:数学 知乎 编辑:程序博客网 时间:2024/06/05 14:33
Js获取当前日期时间及其它操作
var myDate = new Date();
myDate.getYear();
myDate.getFullYear();
myDate.getMonth();
myDate.getDate();
myDate.getDay();
myDate.getTime();
myDate.getHours();
myDate.getMinutes();
myDate.getSeconds();
myDate.getMilliseconds();
myDate.toLocaleDateString();
var mytime=myDate.toLocaleTimeString();
myDate.toLocaleString( );
日期时间脚本库方法列表
Date.prototype.isLeapYear 判断闰年
Date.prototype.Format 日期格式化
Date.prototype.DateAdd 日期计算
Date.prototype.DateDiff 比较日期差
Date.prototype.toString 日期转字符串
Date.prototype.toArray 日期分割为数组
Date.prototype.DatePart 取日期的部分信息
Date.prototype.MaxDayOfDate 取日期所在月的最大天数
Date.prototype.WeekNumOfYear 判断日期所在年的第几周
StringToDate 字符串转日期型
IsValidDate 验证日期有效性
CheckDateTime 完整日期时间检查
daysBetween 日期天数差
js代码:
//---------------------------------------------------
// 判断闰年
//---------------------------------------------------
Date.prototype.isLeapYear = function()
{
}
- 系统时间的获取
- 获取服务器的时间
- 获取系统的时间
- 时间的获取方法
- 纳秒级时间的获取
- 获取本周的时间
- 获取DatePickerDialog的时间
- JS时间的获取
- 获取时间的开销
- 微秒时间的获取
- TimePicker 时间的获取
- 获取昨天的时间
- 时间的获取
- java时间的获取
- 获取昨天的时间
- 获取服务器的时间
- 获取当前的时间
- 获取系统的时间
- 有史来最大改变 Android 5.0十大新特性
- B树、B+树和B*树
- java 代理模式
- Windows核心编程:(一)内核对象
- mybatis中collection日常问题笔记
- 时间的获取
- 第五届河南省大学生程序设计竞赛题解(第一次群赛兼妇女节专场)
- VMware vSphere 常见问题解答整理
- SeekBar使用5
- Shell编程中Shift的用法
- 遇到问题集锦(无c++基础 零起点小小小菜鸟亲身经历) 转自http://blog.csdn.net/qq592116366
- 字符串的应用1
- POJ 3189 Treats for the Cows(两种DP方法解决)
- servlet webservice 比较