分类
网站建设|门户网站|企业网站|个人网站|平面设计|标志设计|名片设计|画册设计|程序语言|设计方法|课堂解题|网站常识|求职技巧|业务技巧|新闻资讯|最新动态|网页配色|设计资讯|产品报价|常用工具|网站教程|技术优化|空间域名|企业邮局|网站制作|网站管理|网站策略|设计理念|色彩调配|创业人生
JavaScript时间脚本大全
发布时间:2008-7-3 19:39:03

JavaScript时间脚本大全

this.year = i
this.yearCyl = i-1864
leap = leapMonth(i) //闰哪个月
this.isLeap = false
for(i=1; i<13 && offset>0; i++) {
//闰月
if(leap>0 && i==(leap+1) && this.isLeap==false)
{ --i; this.isLeap = true; temp = leapDays(this.year); }
else
{ temp = monthDays(this.year, i); }
//解除闰月
if(this.isLeap==true && i==(leap+1)) this.isLeap = false
offset -= temp
if(this.isLeap == false) this.monCyl ++
}
if(offset==0 && leap>0 && i==leap+1)
if(this.isLeap)
{ this.isLeap = false; }
else
{ this.isLeap = true; --i; --this.monCyl;}
if(offset<0){ offset += temp; --i; --this.monCyl; }
this.month = i
this.day = offset + 1
}
//==============================传回国历 y年某m+1月的天数
function solarDays(y,m) {
if(m==1)
return(((y%4 == 0) && (y%100 != 0) || (y%400 == 0))? 29: 28)
else
return(solarMonth[m])
}
//============================== 传入 offset 传回干支, 0=甲子
function cyclical(num) {
return(Gan[num%10]+Zhi[num%12])
}
//============================== 月历属性
function calElement(sYear,sMonth,sDay,week,lYear,lMonth,lDay,isLeap,cYear,cMonth,cDay) {
this.isToday    = false;
//国历
this.sYear      = sYear;

伊图教程网[www.etoow.com]
http://www.etoow.com/html/2007-10/1193133891-11.html
this.sMonth     = sMonth;
JavaScript时间脚本大全
this.sDay       = sDay;
this.week       = week;
//农历
this.lYear      = lYear;
this.lMonth     = lMonth;
this.lDay       = lDay;
this.isLeap     = isLeap;
//干支
this.cYear      = cYear;
this.cMonth     = cMonth;
this.cDay       = cDay;
this.color      = '';
this.lunarFestival = ''; //农历节日
this.solarFestival = ''; //国历节日
this.solarTerms    = ''; //节气
}
//===== 某年的第n个节气为几日(从0小寒起算)
function sTerm(y,n) {
var offDate = new Date( ( 31556925974.7*(y-1900) + sTermInfo[n]*60000  ) + Date.UTC(1900,0,6,2,5) )
return(offDate.getUTCDate())
}
//============================== 传回月历物件 (y年,m+1月)
function calendar(y,m) {
var sDObj, lDObj, lY, lM, lD=1, lL, lX=0, tmp1, tmp2
var lDPOS = new Array(3)
var n = 0
var firstLM = 0
sDObj = new Date(y,m,1)            //当月一日日期
this.length    = solarDays(y,m)    //国历当月天数
this.firstWeek = sDObj.getDay()    //国历当月1日星期几
for(var i=0;i<this.length;i++) {
if(lD>lX) {
sDObj = new Date(y,m,i+1)    //当月一日日期
lDObj = new Lunar(sDObj)     //农历
lY    = lDObj.year           //农历年
lM    = lDObj.month          //农历月
lD    = lDObj.day            //农历日
lL    = lDObj.isLeap         //农历是否闰月
lX    = lL? leapDays(lY): monthDays(lY,lM) //农历当月最後一天
推荐资讯信息
·最大化最小化按钮脚本 (2008-7-3)
·刷新保持状态的折叠菜单 (2008-7-3)
·简单的倒计时代码 (2008-7-3)
·鼠标拖动代码 (2008-7-3)
·按住鼠标左键在网页中写字 (2008-7-3)
·标准布局应用:对联与旗帜脚本代码 (2008-7-3)
·JavaScript时间脚本大全 (2008-7-3)
·ASP下拉菜单代码 (2008-7-3)
官方价敲定!苹果iPod新品 
  新闻搜索
请输入搜索的关键字:
关于我们 | 合作代理 | 客服中心 | 友情连接 | 诚聘英才 | 网站地图 | 加入收藏 | 意见反馈

本站部分信息由企业自行提供,该企业负责信息内容的真实性、准确性和合法性。三和设计网对此不承担任何保证责任
东莞网站建设|东莞建站|东莞企业建站|网站优化|东莞网站设计 http://www.sj363.com/
客服QQ:
客服QQ23299946为您服务客服QQ25015979为您服务 客服QQ707389278为您服务 客服QQ20515979为您服务 客服QQ24019996为您服务
E-Mail: sanhe001@sj363.com 服务热线:0769-22067273 传真: 0769-22808586