Date Object To String Javascript Functions With Parameters