Jeroen Berkers says he has been using this code for years to format the current date. It is designed to be used inside other LISP routines, where it formats the current date with a user-defined delimiter, year format, and U.S. or international order. The function has three arguments. The first is a string to denote the delimiter; you might use "-" or "/" for example. For the second argument, supply either a 2 or 4 to designate the year format, and for the last argument, use "T" for U.S.-style dates (Month, Day) or nil for international-style dates (Day, Month).
Here are some examples:
- (today "-" 4 nil) = 21-12-2013
- (today "/" 2 nil) = 21/12/13
- (today "_" 4 T) = 12_01_2013