Question: I want to convert a Date in to Russian and using the code below

```
SimpleDateFormat.getDateInstance(SimpleDateFormat.LONG,locale).format(date);

```

where locale is of type Locale
The problem is months are not parsed correctly . January is coming as "январь" it should be "января" and February is coming as "февраль" should be "февраля"

and so on...

One idea is to convert incorrect months to proper ones in my logic

Is there any thing by which Java do this automatically ?

Thanks

Answer: 
For **Java 8** you can use a new pattern.

In short:
The `"LLLL"` pattern will get a *Nominative* case:

```
new SimpleDateFormat("LLLL", Locale.getDefault()).format(date); // январь

```

The `"MMMM"` pattern will return a `String` in *Genitive* case:

```
new SimpleDateFormat("MMMM", Locale.getDefault()).format(date); // января

```

Alternatively, instead of hardcoding Russian months in array (since we have Polish, Ukrainian and other languages), you could use the `java.time.Month` enum. It contains both months `int` number and `String` name.
In my task, I shoud only get a month from integer, so this code works perfectly for me:

```
int month=5;//for example
Month.of(month).getDisplayName(TextStyle.FULL_STANDALONE, new Locale("ru"));

```