<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <script> var d2=new Date("2012-03-1"); d2.setFullYear(d2.getFullYear()+1); d2.setDate(d2.getDate()-1); alert(d2.toLocaleString()); </script> </body> </html>
原文地址:https://www.cnblogs.com/growupup/p/9968485.html
时间: 2024-11-10 00:16:00