当前位置: 首页 > news >正文

建网站的流程及注意事项百度联盟广告点击一次收益

建网站的流程及注意事项,百度联盟广告点击一次收益,智慧团建官方网站登录入口,站长网站优点更新说明 加入了String类型的扩展成员 convertToDate() 可以直接将 字符串格式的日期转换为Date对象。加入了String类型的扩展成员 convertToTimeSpan() 可以将 字符串格式的日期转换为TimeSpan对象。修复了日期格式化为字符串的format函数中的bug。tinydate.js v0.3 Date.prot…更新说明 加入了String类型的扩展成员 convertToDate() 可以直接将 字符串格式的日期转换为Date对象。加入了String类型的扩展成员 convertToTimeSpan() 可以将 字符串格式的日期转换为TimeSpan对象。修复了日期格式化为字符串的format函数中的bug。 tinydate.js v0.3 Date.prototype.format function (fmt) {var o {M: this.getMonth() 1, //月份 d: this.getDate(), //日 H: this.getHours(), //小时 m: this.getMinutes(), //分 s: this.getSeconds(), //秒 q: Math.floor((this.getMonth() 3) / 3), //季度 f: this.getMilliseconds() //毫秒 };if (/(y)/.test(fmt)) {fmt fmt.replace(RegExp.$1, (this.getFullYear() ).substr(4 - RegExp.$1.length));}for (var k in o) {if (new RegExp(( k )).test(fmt)) {fmt fmt.replace(RegExp.$1, (RegExp.$1.length 1) ? (o[k]) : ((00 o[k]).substr(( o[k]).length)));}}return fmt; } //当前完整时间 Date.$nowDate new Date().format(yyyy-MM-dd HH:mm:ss.ffff); //获取自定义格式的当前时间 Date.$now function (fmt) {return new Date().format(fmt); } //计算时间差 Date.diff function (sDate, eDate) {if (eDate undefined || eDate null)eDate new Date();var stime sDate.getTime();var etime eDate.getTime();var diffTime etime - stime;var timeSpan new TimeSpan(diffTime);return timeSpan; } //添加年 Date.prototype.addYear function (number) {this.setFullYear(this.getFullYear() number); } //添加月 Date.prototype.addMonth function (number){this.setMonth(this.getMonth()number); } //添加日 Date.prototype.addDate function (number){this.setDate(this.getDate()number); } //添加小时 Date.prototype.addHours function (number){this.setHours(this.getHours()number); } //添加分 Date.prototype.addMinutes function (number){this.setMinutes(this.getMinutes()number); } //添加秒 Date.prototype.addSeconds function (number){this.setSeconds(this.getSeconds()number); } //添加毫秒 Date.prototype.addMilliseconds function (number){this.setMilliseconds(this.getMilliseconds()number); }//获得一年中第一天的日期 Date.prototype.getTheFirstDateOfTheYear function (date) {var year, month0, day1;if (date undefined || date null) {year this.getFullYear();}else {year date.getFullYear();}return new Date(year, month, day); } //获得一年中最后一天的日期 Date.prototype.getTheLastDateOfTheYear function (date) {var year, month 11, day 31;if (date undefined || date null) {year this.getFullYear();}else {year date.getFullYear();}return new Date(year, month, day); } //格式化当前日期 为 时限对象 Date.prototype.timeSpan function () {return new TimeSpan(this); } //时限对象 function TimeSpan() {var o new Object();o.year 0;//年o.month 0;//月o.day 0;//日o.hours 0;//时o.minutes 0;//分o.seconds 0;//秒o.milliseconds 0;//毫秒o.totalYear 0.00;//从时间原点的年o.totalMonth 0.00;//从时间原点到现在的月o.totalDay 0.00;//从时间原点到现在的天o.totalHours 0.00;//从时间原点到现在的小时o.totalMinutes 0.00;//从时间原点到现在的分o.totalSeconds 0.00;//从时间原点到现在的秒o.totalMilliseconds 0.00;//从时间原点到现在的毫秒//初始化对象o.init function (timestamp) {var odate new Date(timestamp);o.year odate.getFullYear();o.month odate.getMonth() 1;o.day odate.getDate();o.hours odate.getHours();o.minutes odate.getMinutes();o.seconds odate.getSeconds();o.milliseconds odate.getMilliseconds();o.totalMilliseconds timestamp;o.totalSeconds (timestamp / 1000).toFixed(2);o.totalMinutes (timestamp / 1000 / 60).toFixed(2);o.totalHours (timestamp / 1000 / 60 / 60).toFixed(2);o.totalDay (timestamp / 1000 / 60 / 60 / 24).toFixed(2);o.totalMonth o.year * 12;o.totalYear o.year;}//无参则返回空对象if (arguments.length 0) {}else if (typeof (arguments[0]) string) {o.init(new Date(arguments[0]));}else if (typeof (arguments[0]) number) {o.init(arguments[0]);} else if (typeof(arguments[0]) object) {o.init(arguments[0]);}return o; }//字符串转换为Date String.prototype.convertToDate function () {return new Date(Date.parse(this.replace(/-/g, /))); }//字符串转换为TimeSpan String.prototype.convertToTimeSpan function () {return new TimeSpan(new Date(Date.parse(this.replace(/-/g, /)))); } 点此下载 tinydate_0.3.js 转载于:https://www.cnblogs.com/nozer1993/p/9198941.html
http://www.zqtcl.cn/news/116245/

相关文章:

  • 大学社团网站建设虚拟主机如何做网站
  • 销售的产品是帮别人做网站电脑搭建网站
  • h5商城网站是什么莆田网站建设技术托管
  • 优惠券怎么做自己的网站英文网站怎么设计
  • 做网站怎么样才能排在首页做微网站的公司哪家好呢
  • 分析网站外链分析工具wordpress同步简书
  • 电子商务网站案例分析互动游戏制作软件
  • 网站做子域名做美团旅游网站多少钱
  • php做网站架构图开家做网站公司有哪些
  • 专门做ppt会员网站鄞州网站制作
  • 企业网站开发视频请简述网站建设流程图
  • 做网站 做手机app要学什么软件网站在哪里购买
  • 老罗做的网站赣州建设部网站
  • 四川建设主管部门网站盘搜搜
  • 创造网站的最简单 软件是哪个免费全自动推广平台
  • 如何看网站做的好坏vs2017做网站
  • 电子商务网站开发费用入账wordpress商城主题模板下载
  • 广西南宁公司网站制作百度推广自己做网站吗
  • 网站建设公司外链怎么做网站开发职业类别代码
  • 网站优化公司怎么选免费手机网站建设
  • 怎么建立自己的网站平台多少钱专用于做网站公司
  • 怎么修改网站后台权限商城网站制作 价格
  • 英铭广州网站建设wordpress服务器域名
  • 怎么做微商网站怎么生成网站源代码
  • 建设网站怎么设置网站页面大小外贸原单童装哪个网站做
  • 网站布局设计软件太原专业做网站
  • 织梦教育培训网站源码素材图下载
  • 内容网站外贸网站外贸网站建设行吗
  • 什么是网络营销定义北京网站关键词优化
  • 开奖视频网站开发成都优化官网公司