there are two ways to interpret the question. the first way is to say that if you had two templates/macros that were similar and you wanted to know which was the most up to date one, then the only way would be to check the "date modified" attribute of the file.
the second way of interpreting it, and probably the more accurate, is what measures you could put in place to track changes to a macro or template. in this case, there are a number of options that vary greatly on the software used but they all rely on the same principle: versioning. You must come up with some sort of system for versioning the files, for example you could use the first number to indicate a major change to the file and the second number for a minor revision, e.g. 1.0, 1.1, 1.2, 2.0. Once this has been established, there are a number of ways of implementing the system:
1) probably the easisest and most useful is the use of meaningful file names. By placing the version number in the file name, each change can be easily tracked.
2) adding the version number and/or date modified to a discreet place within the file. Within macros, this would be a comment in the script. In a template, this would be some sort of unprinted comment in the file.