發表文章

目前顯示的是 11月, 2019的文章

Javascript first day of month and end day of month

     const   today  =  new   Date ();      let   beginDate  =  new   Date ();      let   endDate  =  new   Date ();      // fist date of montg      beginDate  =  new   Date (        ` ${ today . getFullYear () } - ${ today . getMonth () +          1 } -01 00:00:00`     );      // end date of month       // set next Month first Date      endDate  =  new   Date (        ` ${ today . getFullYear () } - ${ today . getMonth () +          2 } -01 :23:59:59`     );      // deducting 1 day      endDate . setDate ( 0 );