Skip to content
Advertisement

Convert Month String to Integer in Java

Given a month string such as:

JavaScript

Is there any core Java or third party library functionality that would allow you to convert this string to the corresponding month number in a locale agnostic way?

Advertisement

Answer

An alternative to SimpleDateFormat using Joda time:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement