- MomentJS Tutorial
- MomentJS - Home
- MomentJS - Overview
- MomentJS - Environment Setup
- MomentJS - Introduction
- MomentJS - Parsing Date And Time
- MomentJS - Date Validation
- MomentJS - Getter/Setter
- Manipulate Date And Time
- Formatting Date And Time
- MomentJS - Date Queries
- MomentJS - Internationalization
- MomentJS - Customization
- MomentJS - Durations
- MomentJS - Utilities
- MomentJS - Plugins
- MomentJS - Examples
- MomentJS Useful Resources
- MomentJS - Quick Guide
- MomentJS - Useful Resources
- MomentJS - Discussion
MomentJS - Week of year
This method will get/set the week of the year. The output will depend on the locale being used, as first day of week differs from country to country.
Syntax
moment().week(Number); moment().week(); moment().weeks(Number); moment().weeks();
Example
var m = moment().week(); var d = moment().week(50); var a = moment().week(90);
Output
momentjs_getter_setter.htm
Advertisements