We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://momentjs.com/docs/#/manipulating/start-of/
moment().startOf('fquarter');
Also why does this plugin not work exactly like moments .quarter?
.quarter
I was confused to learn .fquarter() does not SET the quarter.
.fquarter()
console.log(moment("2013-09-01").quarter(100)); // Tue Dec 01 2037 00:00:00 GMT-0600 (Central Standard Time)
Any way to do this? Below I use add 1 days to bump us into the next Q. Is this safe?
let startMonth = 7; // July let numberOfQuartersToGenerate = 6; var thisQuarter = moment(); for (var i = 0; i < numberOfQuartersToGenerate; i++) { let thisFQuarter = thisQuarter.fquarter(startMonth); let qDisplay = `Q${thisFQuarter.quarter}-${thisFQuarter.year}`; let quarterToDisplayDate = thisQuarter.format("MM-DD-YYYY"); console.log(qDisplay + " " + quarterToDisplayDate); thisQuarter = moment(thisFQuarter.end).add(1, 'days'); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
https://momentjs.com/docs/#/manipulating/start-of/
moment().startOf('fquarter');
Also why does this plugin not work exactly like moments
.quarter
?I was confused to learn
.fquarter()
does not SET the quarter.Any way to do this? Below I use add 1 days to bump us into the next Q. Is this safe?
The text was updated successfully, but these errors were encountered: