企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# B.48 TstampTask Sets the `DSTAMP`, `TSTAMP`, and `TODAY` properties in the current project. By default, the `DSTAMP` property is in the format `"%Y%m%d"`, `TSTAMP` is in the format `"%H%M"`, and `TODAY` is in the format `"%B %d %Y"`. Use the nested `<format>` element to specify a different format. These properties can be used in the build-file, for instance, to create time-stamped filenames, or used to replace placeholder tags inside documents to indicate, for example, the release date. The best place for this task is probably in an initialization target. Table B.49:聽Attributes NameTypeDescriptionDefaultRequired`prefix``String`Prefix used for all properties set.n/aNo B.48.1 Examples `<tstamp/>`sets the standard DSTAMP, TSTAMP, and TODAY properties according to the default formats. ``` <tstamp> <format property="DATE" pattern="%c" locale="nl_NL"/> </tstamp> ``` sets the standard properties as well as the property DATE with the date/time pattern "%c" using the Dutch locale. `<tstamp prefix="start"/>`sets three properties with the standard formats, prefixed with "start.": start.DSTAMP, start.TSTAMP, and start.TODAY. B.48.2 Supported Nested Tags - `format` The `Tstamp` task supports a `<format>` nested element that allows a property to be set to the current date and time in a given format. The date/time patterns are as defined in the PHP `strftime()` function. Table B.50:聽Attributes NameTypeDescriptionDefaultRequired`property``String`The property to receive the date/time string in the given pattern.n/aYes`pattern``String`The date/time pattern to be used. The values are as defined by the PHP strftime() function.n/aYes`locale``String`The locale used to create date/time string. For more information see the PHP setlocale() function.n/aNo`timezone``String`The timezone to use for displaying time.n/aNo