Apply Date/Time Stamp to Special HTML String
CodeWright® - API Macro - Royalty Free -
Apply Date/Time Stamp to Special HTML String.
This function stamps the current date/time between two delimiters found on any line anywhere in a file. These delimiters are of the form
This function also supports the delimiters used in an earlier (pre-XML era) implementation. These delimiters are of the form:
The reason you might want to do this is to automate the stamping of ASP and HTML files to provide a date/time visible to the website visitor that documents when the page was last updated.
It is useful to have a "starter" string in the template that you use for module creation. An example of a "starter" string might be:
This function will convert:
To a string such as:
In addition, this function will convert the older style delimiters to the new style. It will convert a string of the form:
To a string such as:
Original contents of file ...
Contents after executing tlaRevision ...
And this would appear to the website visitor as ...
Revised 2002.06.20 18:31 by AJL.
Count of replacements made in the file (zero if none were made).
This function calls tlaDateTime.
Current version verified under:
CodeWright for .NET Restriction
There are three primary methods for installing this macro on your system. Method A uses the tlaMDE tool available for purchase from this website. Method B manipulates the macro repository directly. Method C uses the API Macro... tool provided in every copy of CodeWright (but not CodeWright for .NET).
Method A - tlaMDE - CodeWright or CodeWright for .NET
Method B - Copy to Repository - CodeWright or CodeWright for .NET
Method C - API Macro ... - CodeWright Only
tlaTools is a Dynamic Link Library that contains most of the API macros on this website in a single easy to install package. The tlaTools DLL can be purchased by selecting the Buy button on this page.
tlaRevision is included as a function in tlaTools.
Copyright © 1993-2005 Thom Little Associates, Ltd. revised
One Central Square, Keene, NH 03431-3787 phone 603-357-7567