# Using M and L Patterns in Java SimpleDateFormat

DevFeed: [Using M and L Patterns in Java SimpleDateFormat](<https://devfeed.tech/articles/simmmmplllledateformat-38617.md>)

Original publisher: [Read original article](<https://krossovochkin.com/posts/2019_07_21_simmmmplllledateformat/>)

Published: 2019-07-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [Vasya Drobushkov](<https://devfeed.tech/sources/vasya-drobushkov.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Java 8](<https://devfeed.tech/topics/java-8.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [format](<https://devfeed.tech/tags/format.md>), [formatting](<https://devfeed.tech/tags/formatting.md>), [java](<https://devfeed.tech/tags/java.md>), [java-8](<https://devfeed.tech/tags/java-8.md>), [locale](<https://devfeed.tech/tags/locale.md>)

## AI overview

This article explains the difference between the M and L pattern letters in Java SimpleDateFormat. It shows that they can produce the same results in English and German but differ in Russian, where M is used for dates with contextual month names and L for standalone month names.

## Source excerpt

Introduction Using SimpleDateFormat to format dates and times is a common thing (as Java 8 Time API is not that available on Android yet). Usually it looks like: val formatter = SimpleDateFormat("dd MMMM yyyy", Locale.ENGLISH) formatter.format(date) We can use different formats and locales with not only providing correct translations, but also some additional locale-specific formatting rules. One tricky thing about SimpleDateFormat formats is why we have M and L when they look identical?