June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -0,0 +1 @@
cl_demo_output=>display( |Result: { CONV datum( 0 ) }| ).

View file

@ -1 +1,2 @@
println("Time zero (the epoch) is ", strftime("%c", 0), ".")
using Base.Dates
println("Time zero (the epoch) is $(unix2datetime(0)).")

View file

@ -0,0 +1,9 @@
now = the systemDate
put now
-- date( 2018, 3, 21 )
babylonianDate = date(-1800,1,1)
-- print approx. year difference between "babylonianDate" and now
put (now-babylonianDate)/365.2425
-- 3818.1355

View file

@ -1,11 +1,11 @@
/*REXX program shows the # of days since the epoch for the DATE function*/
/*REXX program displays the number of days since the epoch for the DATE function (BIF). */
say ' today is' date() /*today's is format: mm MON YYYY */
say ' today is: ' date() /*today's is format: mm MON YYYY */
days=date('Basedate') /*only 1st char of option is used*/
say right(days,35) "days since the REXX base date of January 1st, year 1"
days=date('Basedate') /*only the first char of option is used*/
say right(days, 40) " days since the REXX base date of January 1st, year 1"
say 'and today is:' date(,days,'B') /*this should be today (still). */
/*──────── The above statement is only valid for the newer REXXes,*/
/*──────── older versions don't support the 2nd and 3rd arguments.*/
say ' and today is: ' date(, days, "B") /*it should still be today (µSec later)*/
/* ↑ ┌───◄─── This BIF (Built-In Function) is only */
/* └─────────◄──────┘ for newer versions of REXX that */
/* support the 2nd and 3rd arguments. */

View file

@ -0,0 +1,4 @@
. di %td 0
01jan1960
. di %tc 0
01jan1960 00:00:00