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