Convert js to timestamp

converts the current time to a timestamp and saves it to localStorage.
uses another time to generate a timestamp to determine whether the interval between the two is greater than one month.

or not switch to a timestamp, as long as you can determine the time interval in localStorage.

well, I have solved this problem.

Mar.03,2021

you can first get the year, month and day of the current time, then store them in localStorage, and then get the year, month and day of the next time. Compare

according to this string.
Menu