java.lang.IllegalArgumentException: Invalid format: "P1M"

Stack Overflow | stackUnderflow | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Parsing ISO 8601 duration format to Joda duration - IllegalArgumentException

    Stack Overflow | 6 months ago | stackUnderflow
    java.lang.IllegalArgumentException: Invalid format: "P1M"

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Invalid format: "P1M"

      at org.joda.time.convert.StringConverter.getDurationMillis()
    2. Joda-Time
      Duration.parse
      1. org.joda.time.convert.StringConverter.getDurationMillis(StringConverter.java:111)
      2. org.joda.time.base.BaseDuration.<init>(BaseDuration.java:105)
      3. org.joda.time.Duration.<init>(Duration.java:209)
      4. org.joda.time.Duration.parse(Duration.java:59)
      4 frames