what is the difference between MM and mm and why not have DD instead of dd for date-fns
01:16 24 Sep 2021

See example code sandbox https://codesandbox.io/s/date-fns-v2-xjv04?file=/src/index.js

import { format } from "date-fns";
const strDate =  "2021-08-06T10:20:50.000Z";
const dt = new Date(strDate);
dt.toISOString(strDate)                    // 2021-08-06T10:20:50.000Z 
format(dt, "yyyy-MM-dd'T'HH:mm:ss.SSSxxx") // 2021-08-06T11:20:50.000+01:00 
format(dt, "dd-MM-yyyy")                   // 06-08-2021 
format(dt, "dd-mm-yyyy")                   // 06-20-2021 - WRONG MONTH 20 ??????

I am confused why there are variations in this? Also it's easy to make the mistake and use lowercase for everything since there isn't a DD and you begin with dd.

date-fns