#!/bin/sh
: ; exec klone $0 "$@"
; The above line finds the klone executable in the $PATH

;; numerical date of today

(wait (system ">/tmp/.,numdate"))
(setq stats (file-stats "/tmp/.,numdate"))
(wait (system '("rm" "-f" "/tmp/.,numdate")))

(setq date-sec (get stats 'mtime 0))

(setq datel (seconds-to-date date-sec))

(defun pad2 (n)
  (+ (if (< n 10) "0" "") (String n))
)

(print-format () "%0-%1-%2\n"
  (pad2 (mod (get datel 0 0) 100))
  (pad2 (get datel 1 0))
  (pad2 (get datel 2 0))
)
