title: log4j2 IfLastModified condition in a Delete action is not interpreting age duration correctly
body: <p>I can't seem to get the <strong>IfLastModified</strong> condition in my log4j <strong>Delete</strong> action to properly interpret an age set in months. It keeps using it as minutes.</p>
  <p>I have this Delete action in my log4j XML configuration file.</p>
  <pre><code>&lt;DefaultRolloverStrategy&gt;
     &lt;Delete basePath=&quot;${logging.dir}&quot; maxDepth=&quot;1&quot;&gt;
        &lt;IfFileName glob=&quot;framework-${hostName}-*.log&quot; /&gt;
        &lt;IfLastModified age=&quot;2m&quot; /&gt;
     &lt;/Delete&gt;
  &lt;/DefaultRolloverStrategy&gt;
  </code></pre>
  <p>Unfortunately, it keeps using the age as minutes as seen from the logs:</p>
  <pre><code>createDeleteAction(basePath=&quot;./build/logs&quot;, followLinks=&quot;false&quot;, maxDepth=&quot;1&quot;, testMode=&quot;false&quot;, PathSorter=null, ={IfFileName(glob:framework-SY4-9CMY2W2-*.log), IfLastModified(age=PT2M)}, ScriptCondition=null, Configuration...
  </code></pre>
  <p>According to the Duration specification
  <a href="https://en.wikipedia.org/wiki/ISO_8601#Durations" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/ISO_8601#Durations</a>
  &quot;To resolve ambiguity, &quot;P1M&quot; is a one-month duration and &quot;PT1M&quot; is a one-minute duration (note the time designator, T, that precedes the time value)&quot;</p>
  <p>I tried specifying the age using different Duration formats but the same result.</p>
  <pre><code>&lt;IfLastModified age=&quot;P2m&quot; /&gt;
  ...
  &lt;IfLastModified age=&quot;P2M&quot; /&gt;
  </code></pre>
  <p>I know I can specify 60D but I'm wondering why I can't use months duration.</p>
  <p>I am using log4j 2.12.1</p>
  <p>Furthermore, I suspected it could be because the filePattern was in minutes.</p>
  <pre><code>filePattern=&quot;${logging.dir}/framework-${hostName}-%d{yyyy-MM-dd-HH-mm}.log&quot;
  </code></pre>
  <p>However, that did not have any effect.</p>