1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| import { isNaN } from '../utils/validate/number';
| export function times(n, iteratee) {
| if (n < 0) {
| return [];
| }
|
| var index = -1;
| var result = Array(n);
|
| while (++index < n) {
| result[index] = iteratee(index);
| }
|
| return result;
| }
| export function getTrueValue(value) {
| if (!value) {
| return 0;
| }
|
| while (isNaN(parseInt(value, 10))) {
| if (value.length > 1) {
| value = value.slice(1);
| } else {
| return 0;
| }
| }
|
| return parseInt(value, 10);
| }
| export function getMonthEndDay(year, month) {
| return 32 - new Date(year, month - 1, 32).getDate();
| }
|
|