假设我有一个这样的 JSON 文件
[
{
"programId": "bla-bla-1",
"programTitle": "bla bla 1",
"programImg": "bla1.jpg",
"startsAt": "Apr 05 2017 11:00:00 GMT+0200 (EET)",
"endsAt": "Apr 05 2017 12:00:00 GMT+0200 (EET)"
},
{
"programId": "bla-bla-2",
"programTitle": "bla bla 2",
"programImg": "bla2.jpg",
"startsAt": "Apr 05 2017 12:00:00 GMT+0200 (EET)",
"endsAt": "Apr 05 2017 14:00:00 GMT+0200 (EET)"
},
{
"programId": "bla-bla-3",
"programTitle": "bla bla 3",
"programImg": "bla3.jpg",
"startsAt": "Apr 05 2017 14:00:00 GMT+0200 (EET)",
"endsAt": "Apr 05 2017 16:00:00 GMT+0200 (EET)"
}
]
当前时间是(2017 年 4 月 5 日12:30:00 GMT+0200 (EET))我如何使用 Javascript 从这些时间范围获取当前程序我也可以使用像 momentJS 这样的库