datepicker - moving getFormatted date to own function, updating tests, and modifying index.html (not gh-pages documentation)