No custom date generation code

use Date#toISOString, which produces an RFC-3339 compatible string in UTC
The type check was being done in multiple places. I saved it for the getDate function itself; said function accepts any valid value that the Date constructor would take. It wasn't moved for any particular reason, I actually wrote the new line before realizing the old one was there (I hadn't expected it to be there). I also am uncertain why you used the syntax "new Date(Date())", and simplified it.