I have a need to set the value of a property to the current fiscal year. For 
this purpose, that means that when running a build in October, November, or 
December, the value must be the current year +1. In any other month, the value 
is the same as the current year.

I thought something like this would do the trick:
I set the value of ${MON} manually to "10" for testing purposes.

<property name="MON" value="10" />

<switch value="${MON}">
  <case value="10">
    <tstamp>
      <format property="current.fy" pattern="yyyy" offset="1" />
    </tstamp>
  </case>
  <case value="11">
    <tstamp>
      <format property="current.fy" pattern="yyyy" offset="1" />
    </tstamp>
  </case>
  <case value="12">
    <tstamp>
      <format property="current.fy" pattern="yyyy" offset="1" />
    </tstamp>
  </case>
  <default><property name="current.fy" value="${YEAR}" /></default>
</switch>

But the offset isn't applied. When I <echo>${current.fy}</echo> I get "2007".

Can someone offer me a solution to this?

Thanks.

-- 
Charles Knell
[EMAIL PROTECTED] - email

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to