UNPKG
pm-xe-utils
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
JavaScript 函数库、工具类
github.com/x-extends/xe-utils
x-extends/xe-utils
pm-xe-utils
/
isValidDate.js
15 lines
(12 loc)
•
304 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var
isDate =
require
(
'./isDate'
)
var
helperGetDateTime =
require
(
'./helperGetDateTime'
)
/** * 判断是否有效的Date对象 * *
@param
{
any
} val 对象 *
@return
{
boolean
} */
function
isValidDate
(
val
) {
return
isDate
(val) && !
isNaN
(
helperGetDateTime
(val)) }
module
.
exports
= isValidDate