In this article, we will show you How to Get Current Week Start and End Date with Moment.js. This article will give you simple example of How To Get Current Week Start and End Date with Moment.js. you will learn How To Get Current Week Start and End Date with Moment.js.
<!DOCTYPE html> <html> <head> <title>Get Current Week Start and End Date with Moment.js - Codeplaners.com</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js" crossorigin="anonymous"></script> </head> <body> <h1>Get Current Week Start and End Date with Moment.js - Codeplaners.com</h1> </body> <script type="text/javascript"> var startDate = moment().startOf('week'); var endDate = moment().endOf('week'); console.log('Start Date:' + startDate.format('MM/DD/YYYY')); console.log('End Date:' + endDate.format('MM/DD/YYYY')); </script> </html>