time.js 244 B

12345678
  1. function transform_time_to_string(date) {
  2. let new_string = "";
  3. new_string += `${date.getFullYear()}`
  4. new_string += `-${date.getMonth()+1}`
  5. new_string += `-${date.getDay()+1}`
  6. console.log(new_string);
  7. return new_string;
  8. }