| | |
| | | return [year, Sign, month , Sign, day, ' ', hour , ':', minute, ':', '00' ].join(''); |
| | | } |
| | | |
| | | export { gsdate, setTime, setTimeO } |
| | | /*** |
| | | * phoneRegular: 手机号验证 |
| | | * mailboxRegular: 邮箱验证 |
| | | * positiveInteger: 正整数 |
| | | * decimal: 小数(只支持四位小数) |
| | | * positiveIntegerDecimal: 正整数小数(最多四位小数) |
| | | * number:数字最多保留四位小数 |
| | | */ |
| | | const REGULAR = { |
| | | phoneRegular: /^1[3456789]\d{9}$/, |
| | | mailboxRegular: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/, |
| | | positiveInteger: /^[0-9]*[1-9][0-9]*$/, |
| | | decimal: /^0$|^[1-9]\d{0,15}$|^[1-9]\d{0,15}\.{1}\d{1,4}$|^0\.{1}\d{1,4}$/g, |
| | | positiveIntegerDecimal: /^([1-9][0-9]*|0)(\.[0-9]?[1-9][1-9][1-9])?$/, |
| | | number: /^\d+(?:\.\d{1,4})?$/ |
| | | } |
| | | |
| | | export { gsdate, setTime, setTimeO, REGULAR } |