YYYYMMDD 1.6 build: 9470 released: 2011-09-23 Display date and time in pipeable form for the command line. Copyright: (c) 2012 Canadian Mind Products. C command line utility. Download from: http://mindprod.com/products3.html#YYYYMMDD ===> Free <=== Full source included. You may even include the source code, modified or unmodified in free/commercial open source/proprietary programs that you write and distribute. May be used freely for any purpose but military. For more details on this restriction, see http://mindprod.com/contact/nonmil.html If you include any Canadian Mind Products code in your own applications, your app too must be labeled non-military use only. All C source and EXE files code are included. ---- Prerequisites: This program runs under Microsoft Windows from the command line (e.g. Win2K/XP/Vista) ---- Installing on a PC: Download source and executable files to run on your own machine as a standalone utility. To install, extract the zip download with WinZip (or similar unzip utility) into any directory you please, often J:\ -- ticking off the "use folder names" option. ---- Installing on a MacIntosh: Use Safari to download source and executable files to run on your own machine as a standalone utility. The EXE files will not work. You will have to recompile, perhaps making minor changes to the source code. Safari will automatically unpack the zip into ~/Downloads (version 10.5) [or on the Desktop (version 10.4 and earlier)]. First install a recent Java JDK or JVM. See http://mindprod.com/jgloss/installingjava.html. You may optionally move the download tree to a permanent home. ---- Rebuilding: The zip already contains the necessary exe, so unless you modify the program, there is no need to recompile the source or recompile it. Configure.java basedir="E:/" in rebuild.xml to the drive where your files are and tweak rebuild.xml. Use ANT and rebuild.xml, not build.xml, to rebuild and link. ---- Use: YYYYMMDD displays the date in form YYYY-MM-DD, without CrLf. You can thus PIPE it into files: YYYYMMDD.com >> MyFile.Txt to internally date stamp them. Optional separator can be put on the command line. e.g. if you wanted ISO 8601:1988 international standard yyyy-mm-dd format, on the command line, or in a bat file type: YYYYMMDD - gives 2000-12-31 YYYYMMDD " " gives 2000 12 31 YYYYMMDD . gives 2000.12.31 YYYYMMDD / gives 2000/12/31 You can pipe the result into files: YYYYMMDD.exe >> MyFile.Txt If you wanted a 2-digit year: yy-mm-dd format, on the command line, or in a bat file type: YYMMDD - gives 00-12-31 YYMMDD none gives 001231 YYMMDD space gives 00 12 31 YYMMDD . gives 00.12.31 YYMMDD / gives 00/12/31 YYMMDD gives 00-12-31 You can pipe the result into files: YYMMDD.com >> MyFile.Txt If you wanted 24-hour time: hh:mm format, on the command line, or in a bat file type: HHMM : gives 23:59 HHMM - gives 23-59 gives 2359 HHMM " " gives 23 59 HHMM . gives 23.59 HHMM gives 23:59 You can pipe the result into files: HHMM.com >> MyFile.Txt Often used in conjunction with HHMM to stamp the time. There is no support for other formats: e.g. MM/DD/YYYY or DD/MM/YYYY. The *.com files are for DOS. the *.exe files are for use in Windows. Just place yyyymmdd.exe yymmdd.exe and hhmm.exe somewhere on the path. ---- Version History: 1.6 2011-09-23 port the DOS assembler version -30-