[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dope program
From: |
Emanuel Berg |
Subject: |
dope program |
Date: |
Wed, 06 Jan 2021 06:46:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
(defun dope (boxes pills dose &optional from)
(interactive "nboxes: \nnpills/box: \nndose/day: ")
(let*((days (/ (* boxes pills) dose))
(done (time-add (when from
(date-to-time (concat from "T00:00+01:00")) )
(days-to-time (1- days)) ))
(done-str (format-time-string "%F" done))
(get-more (format-time-string "%F"
(time-add done (days-to-time -10))) ))
(insert (format "%s [%s] %s" ; don't change
(or from (format-time-string "%F")) get-more done-str) )))
Very useful, and seems to work, just put the output data in
a text file.
--
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal
- dope program,
Emanuel Berg <=