« first day (5121 days earlier)      last day (27 days later) » 

3:35 PM
As you already have a working solution, and don’t really have a problem with a specific answer, would you move this question over to softwareengineering.stackexchange.com? I have a proposal for making the thing you want simpler. If you open a new thread there, please comment with a link here. Thanks :) — Zach Young 17 secs ago
 
4 hours later…

« first day (5121 days earlier)      last day (27 days later) »