I have two String
variables containing values "201703"
and "201506"
respectively i.e. the values are of the format "yyyyMM"
but variables of type String
. I want to find out the difference between those two dates in number months using Scala and JDK 8.
Example inputs:
val x = "201506"
val y = "201703"
Desired output:
21