题解 | #计算日期到天数转换#
计算日期到天数转换
http://www.nowcoder.com/practice/769d45d455fe40b385ba32f97e7bcded
let inputStr = readline();
let arr = inputStr.split(' ')
let msValue = new Date(arr[0], arr[1]-1, arr[2]) - new Date(arr[0], 0, 0)// 相差的毫秒数
let days = msValue/(1000*60*60*24)// (1000ms 60s 60min 24h) 转化为天
print(days)