DateTime format not working correctly for weekdays

I’ve been kinda stumped by this, because I can’t imagine why this error is occuring.
For testing purposes, I ran this from the same file the error was occuring in:

console.log('Date: ' +;
console.log('YYYY: ' + moment('YYYY'));
console.log('MMM: ' + moment('MMM'));
console.log('MMMM: ' + moment('MMMM'));
console.log('DD: ' + moment('DD'));
console.log('DDD: ' + moment('DDD'));
console.log('DDDD: ' + moment('DDDD'));

Which gives me this output:

Date: 02/01/2018
YYYY: 2018
MMM: Feb
MMMM: February
DD: 01
DDD: 32
DDDD: 032

It can’t be a problem with the type conversion, since the month name returns just fine. Getting the day as a number works also, but what’s happening with the weekday name?

I’m running Ionic v3.9.2 btw.


console.log('dddd: ' + moment('dddd'));

Huh, using lowercase instead of upper actually fixed the problem.Thanks!

Please mark it as a solution.

Thank you.