Moment Get Current Week Number Example
This article will give you example of moment get current week number. I’m going to show you about how to get current week number in moment js. This post will give you simple example of moment js get current week number. you will learn jquery moment get current week number.
Here, i will give you simple example of jquery moment js get current week number using week().
let's see both example with output:
<title>jquery moment example - ItSolutionStuff.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>
<h1>jquery moment example - ItSolutionStuff.com</h1>
var weekNumber = moment('02-01-2021', 'DD-MM-YYYY').week();
var weekNumber = moment().week();
I hope it can help you...
We are Recommending you
- Moment Difference Between Two Dates in Hours Minutes and Seconds
- Moment JS Difference Between Two Dates In Years, Months, Days
- Moment JS Check if Date is Future or not Example
- Moment JS Humanize Duration | Moment fromNow() Example
- Moment JS Get Last Date of Month Example
- Moment JS Get Month Name from Number Example
- JQuery Moment JS Subtract Hours to Datetime Example
- JQuery Moment Add Hours to Datetime Example
- JQuery Moment Add Days to Date Example