Ant includes a Tstamp task that allows a property to be set to the current date and time in a given format. Unfortunately there is no way to get that value as a Unix time (epoch).
Ant includes a number of selectors that you can use in combination with a fileset to reduce the number of files in your selection. Unfortunately there is no built-in selector to select only the newest file of a directory where each file has a time stamp as its filename.
I have built my own custom invoicing tool using XML, XSLT , XSL-FO and Ant. It is probably a little bit overkill but it is certainly better than being locked into some proprietary Windows application. It also give me more flexibility compared to most online invoicing applications.
One important feature that was missing so far was the scheduling of reminders to check payments. This has been solved thanks to Remember The Milk and some Ant script.