jquery date string rotation Sunday

GETD function (dayValue) {
      dayValue = '2018-01-02';
      var = new new a Date Day (Date.parse (dayValue.replace (G //, '/'))); // the formatted date value
      var today = new Array ( "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
      return Today [day.getDay ()]; //day.getDay (); Date according to a return of the week is Sunday wherein 0
   }

Guess you like

Origin blog.csdn.net/qq_42310995/article/details/88601948