ruoxing.wang
6 months ago
2 changed files with 83 additions and 0 deletions
@ -0,0 +1,38 @@ |
|||
function GetMonth() { |
|||
var result = []; |
|||
var result_small = []; |
|||
var result_big = []; |
|||
for (var i = 1; i <= 12; i++) { |
|||
var d = new Date(); |
|||
var m = d.getMonth() + 1; |
|||
if (i <= m) { |
|||
result_small.push(i + '月'); |
|||
} |
|||
else { |
|||
//result_big.push('去年' + i + '月');
|
|||
result_big.push(i + '月'); |
|||
} |
|||
} |
|||
result = result_big.concat(result_small); |
|||
return result; |
|||
} |
|||
|
|||
function GetDate() { |
|||
var result = []; |
|||
var result_small = []; |
|||
var result_big = []; |
|||
|
|||
var d = new Date(); |
|||
var m = d.getDate(); |
|||
for (var i = 1; i <= 31; i++) { |
|||
if (i <= m) { |
|||
result_small.push(i); |
|||
} |
|||
else { |
|||
//result_big.push('去年' + i + '月');
|
|||
result_big.push(i); |
|||
} |
|||
} |
|||
result = result_big.concat(result_small); |
|||
return result; |
|||
} |
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue