How do I get the string dd.mm.yyyy and how can I convert it depending on the user’s locale?

How can I get the string dd.mm.yyyy in JavaScript and convert it depending on the user’s locale (for example, дд.мм.гггг)? Is it possible with the help of internal functions, or will you have to write your own converter?

I tried to find a solution in Datе and Intl.DateTimeFormat, but I didn’t find it there.