Web/DotBBS_Net/Js/easydate.js
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// returns array with days in the months
var Dateformat = 'yyyy-mm-dd'; //Set the dateformat
function DatearrayOfDaysInMonths(adm_isLeapYear) {
this[0] = 31;
this[1] = 28;
// if Leap Year there is 29 days in Feb
if (adm_isLeapYear)
this[1] = 29;
this[2] = 31;
this[3] = 30;
this[4] = 31;
this[5] = 30;
this[6] = 31;
this[7] = 31;
this[8] = 30;
this[9] = 31;
this[10] = 30;
this[11] = 31;
}
var today = new Date();
var day = today.getDate();
var month = today.getMonth();
var year = y2k(today.getYear());
var activeDateField1;
var activeDateField2;
// _________________________________________________________
// The next two functions handle the formatting of the date.
// To add a new mask you only need to added the conversion
// to the next two functions respectively
// _________________________________________________________
// Split the date based on format
function DateSplitDate(stDate){
arryDate = stDate.split('-');
arryNewDate = new Array(3);
if (Dateformat == 'yyyy-mm-dd')
arryNewDate = new Array(arryDate[1]-0,arryDate[2]-0,arryDate[0]-0);
else if (Dateformat == 'mm/dd/yyyy')
arryNewDate = new Array(arryDate[0]-0,arryDate[1]-0,arryDate[2]-0);
else if (Dateformat == 'dd/mm/yyyy')
arryNewDate = new Array(arryDate[1]-0,arryDate[0]-0,arryDate[2]-0);
return arryNewDate; //Return date array: [0] = month, [1] = day, [2] = year
}
// Join the date based on format
function DateJoinDate(arryDate){ //arryDate: [0] = month, [1] = day, [2] = year
if (Dateformat == 'yyyy-mm-dd')
var stDate = arryDate[2] + '-' + (arryDate[0]<10?'0'+arryDate[0]:arryDate[0]) + '-' + (arryDate[1]<10?'0'+arryDate[1]:arryDate[1]);
else if (Dateformat == 'mm/dd/yyyy')
var stDate = (arryDate[0]<10?'0'+arryDate[0]:arryDate[0]) + '/' + (arryDate[1]<10?'0'+arryDate[1]:arryDate[1]) + '/' + arryDate[2];
else if(Dateformat == 'dd/mm/yyyy')
var stDate = (arryDate[1]<10?'0'+arryDate[1]:arryDate[1]) + '/' + (arryDate[0]<10?'0'+arryDate[0]:arryDate[0]) + '/' + arryDate[2];
return stDate
}
后面还有 100 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。