ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Idea-- Tstamp attribute
Date Fri, 21 Oct 2005 06:22:08 GMT
Mmh, some thoughts:

First thought was: why you need that? Just do a 
  $ant -Dlogdate=20050511
and you´ll get it. But maybe there are more derived dates...


Then have a look at the format...

<format 
    property=""     required
    pattern=""      required
    timezone=""     System default: TimeZone.getDefault()
    offset=""       default: 0 (BuildException by Ant, if not a number)
    unit=""         required if offset is used; BuildEx by EnumeratedAttribute on invalid
values
    locale=""       System default: Locale constructor; BuildExc if illegal value

    value=""        default: current date; BuildEx if wrong pattern;
                    --> check and throw the BuildEx for your own
                    --> which pattern? should be the same as specified in pattern-attribute


I havent need that, but that´s only me. It would not disturb (I hope) ... 
But just collect some other opinion.


Ah yes - dont forget the unit tests ;-)


Jan

        

    

>Hi,
>I want to add "value"attribute to TstampTask.
>
>--usage--
>ant -Dday=20051011 clean.logfile
>
>  <tstamp>
>      <format property="logdate"
>              pattern="yyyyMMdd"
>              value="${day}"
>              offset="-5"
>              unit="month"/>
>  </tstamp>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message