js 创建Date对象5种方式

来源:互联网 发布:股票配资子账户软件 编辑:程序博客网 时间:2024/06/16 02:02

js 创建Date对象

  1. new Date(“month dd,yyyy hh:mm:ss”);
  2. new Date(“month dd,yyyy”);
  3. new Date(yyyy,mth,dd,hh,mm,ss);
  4. new Date(yyyy,mth,dd);
  5. new Date(ms);