日のリストから最も近いものを取得したいと思います:
シナリオ 1:
Date: July 22, 2013 (Monday)
Possible days: "Tuesday", "Wednesday", "Friday" (string values)
Answer: July 23, 2013 (Tuesday)
シナリオ 2:
Date: July 23, 2013 (Tuesday)
Possible days: "Tuesday", "Wednesday", "Thursday", "Saturday"
Answer: July 24, 2013 (Wednesday)
シナリオ 3:
Date: July 24, 2013 (Wednesday)
Possible days: "Monday", "Tuesday"
Answer: July 29, 2013 (Monday)
助言がありますか?