I do like making tiny personal tools though.
So I wrote a tiny php script with a webform for my local web server, to tell me the weekday for a given date.
Such small things give me a suprisingly large amount of pleasure to make and see it work. Next step is to do this over the command line or through Alfred, rather than a web interface. Update: found an Alfred workflow that I adapted, which either shows the day or puts it on the clipboard for pasting.
The code is easy as PHP has a function for it.
if ($_POST) {
$dag = $_POST['dag'];
$maand = $_POST['maand'];
$jr = $_POST['jaar'];
$jd=gregoriantojd($maand,$dag,$jr); /*NB this function uses the awkward US date format m/d/y */
echo $dag."-".$maand."-".$jr." was een ".jddayofweek($jd,1);
}
On most unix-like command lines, you’ll have `cal` available, with plenty of options for showing specific things. That might help?
Or, without the need for a conversion to Julian:
“`
echo $dag.”-“.$maand.”-“.$jr.” was een “. date(‘l’, mktime(12, 0, 0, $maand, $dag, $jr));
“`