參數是字符串的時候,會使用Date.parse,而其中咋解釋字符串"0"是實現自己定義的。這與參數是數字的時候完全不同。TheparsefunctionappliestheToStringoperatortoitsargument.IfToStringresultsinanabruptcompletiontheCompletionRecordisimmediatelyreturned.Otherwise,parseinterpretstheresultingStringasadateandtime;itreturnsaNumber,theUTCtimevaluecorrespondingtothedateandtime.TheStringmaybeinterpretedasalocaltime,aUTCtime,oratimeinsomeothertimezone,dependingonthecontentsoftheString.ThefunctionfirstattemptstoparsetheStringaccordingtotheformatdescribedinDateTimeStringFormat(20.3.1.15),includingexpandedyears.IftheStringdoesnotconformtothatformatthefunctionmayfallbacktoanyimplementation-specificheuristicsorimplementation-specificdateformats.Stringsthatareunrecognizableorcontainout-of-boundsformatfieldvaluesshallcauseDate.parsetoreturnNaN.