You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Depthblue <de...@centrum.cz> on 2007/04/24 18:35:15 UTC

How shows colon (:)

I save date to propertyfile. I use pattern="hh:mm:ss", but I see in property
file for time 21:45:15 this fecord 21\:45\:15.
Every colon (:) are replaced to \:

How show only colon in value?

<propertyfile file="${buildInformationFile}" comment="Build information">
  <entry key="build.number" type="int" default="0" operation="+"/>
  <entry key="build.date" type="date" value="now" pattern="hh:dd:ss"/>
  <entry key="build.computer" value="${env.COMPUTERNAME}"/>
</propertyfile>
-- 
View this message in context: http://www.nabble.com/How-shows-colon-%28%3A%29-tf3639816.html#a10164817
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: How shows colon (:)

Posted by Peter Reilly <pe...@gmail.com>.
See:
http://java.sun.com/j2se/1.3/docs/api/java/util/Properties.html

"""The key and value characters #, !, =, and : are written with a
preceding slash to ensure that they are properly loaded."""

This means that when read back in, the \ is removed.

Peter



On 4/24/07, Depthblue <de...@centrum.cz> wrote:
>
> I save date to propertyfile. I use pattern="hh:mm:ss", but I see in property
> file for time 21:45:15 this fecord 21\:45\:15.
> Every colon (:) are replaced to \:
>
> How show only colon in value?
>
> <propertyfile file="${buildInformationFile}" comment="Build information">
>   <entry key="build.number" type="int" default="0" operation="+"/>
>   <entry key="build.date" type="date" value="now" pattern="hh:dd:ss"/>
>   <entry key="build.computer" value="${env.COMPUTERNAME}"/>
> </propertyfile>
> --
> View this message in context: http://www.nabble.com/How-shows-colon-%28%3A%29-tf3639816.html#a10164817
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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