date.unix is not a function
时间: 2023-11-24 15:07:13 浏览: 39
The error "date.unix is not a function" occurs when you try to call the unix() method on a date object that does not have this method.
There are a few possible reasons for this:
1. You may have misspelled the method name. The correct method name is "getTime()", not "unix()".
2. The date object you are trying to call the unix() method on may not be a valid date object. Make sure that the date object is created correctly and that it is an instance of the Date class.
3. The date object you are using may not be supported by the browser or environment you are using. Check the documentation for your specific environment to see if the unix() method is supported.
To fix this error, you should check the spelling of the method name and ensure that the date object is valid and supported by your environment.