0

For JAVA: I need a method that takes a date with the month in letters like "January" or "JAN" and finds it's correspondent "01".

Can you give me any ideas?

RishiKesh Pathak
  • 2,122
  • 1
  • 18
  • 24
  • 1
    My idea would be to take a look at the java.time classes, and learn the basics of parsing and formatting with those classes: [Java string to date conversion](https://stackoverflow.com/questions/4216745/java-string-to-date-conversion) – OH GOD SPIDERS Jun 28 '22 at 15:16
  • if you have a String like `January`, then you can do `Month.valueOf("January".toUpperCase()).getValue()` to get the numeric value – XtremeBaumer Jun 28 '22 at 15:18

0 Answers0