On Sat, 2 Feb 2019, Artur T. wrote:
Am 02.02.19 um 16:47 schrieb Sven Schreiber:
> Am 02.02.2019 um 15:31 schrieb Allin Cottrell:
>
>
>> and this should work on OS X too. On Windows I think that
>>
>> string s = grab("date /t")
>>
>> ought to work but I haven't tested it. I see that grab() never got
>> documented, but it retrieves the output from a shell command.
>
> Interesting.
Indeed! Thanks for this information, Allin.
I've just tried on ubuntu
<eval grab("date --date='today' +'%d/%m/%Y'")>
which works fine!
I've just added to the git version a "$now" accessor that should simplify
things a bit; example:
<hansl>
set verbose off
x = $now
printf "%20.12f\n\n", x
yr = floor(x/10000)
x -= yr*10000
mth = floor(x/100)
x -= mth*100
day = floor(x)
x -= day
printf "Today is %d/%d/%d\n", day, mth, yr+2000
</hansl>
produces
<output>
190207.495601851871
Today is 7/2/2019
</output>
Allin, feel free to scrap it if you want!
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------