Files
Nim/tests/misc/tlastmod.nim
2014-08-31 15:15:26 +02:00

19 lines
430 B
Nim

# test the new LastModificationTime() proc
import
os, times, strutils
proc main() =
var
a, b: TTime
a = getLastModificationTime(paramStr(1))
b = getLastModificationTime(paramStr(2))
writeln(stdout, $a)
writeln(stdout, $b)
if a < b:
write(stdout, "$2 is newer than $1\n" % [paramStr(1), paramStr(2)])
else:
write(stdout, "$1 is newer than $2\n" % [paramStr(1), paramStr(2)])
main()