[Coco] Julian Date

Wayne Campbell asa.rand at gmail.com
Wed May 24 17:28:04 EDT 2017


The functions provided by Luis are not Basic09. B09 does not support
function structures like this, and MOD in B09 is a ML function whose syntax
is MOD(arg1,arg2), not arg1 MOD arg2.


On May 24, 2017 2:22 PM, "Gregory Law" <glaw at live.com> wrote:

This is Basic09 on OS-9/NitrOS-9.

On 5/24/2017 5:18:54 PM, "Wayne Campbell" <asa.rand at gmail.com> wrote:

>I find these two functions interesting. What language is it?
>
>It looks like BASIC, but I've never seen a function in basic written
>this
>way before.
>
>
>On May 23, 2017 7:37 PM, "Luis Fernández" <luis46coco at hotmail.com>
>wrote:
>
>>  OR
>>
>>
>>  FUNCTION FechaJulDMA (tjul, dd, mm, aa)
>>  T = tjul + 62
>>  t2 = FIX(T / 1461) * 4 + 1700
>>  t1 = T MOD 1461
>>  IF t1 > 365 THEN
>>  t1 = t1 - 1
>>  oa = FIX(t1 / 365)
>>  t1 = t1 MOD 365
>>  END IF
>>  aa = t2 + oa
>>  dias = t1 + 1
>>  dd = dias
>>  swb = 1 - SGN(oa)
>>  IF dd > 212 + swb THEN dd = dd + 30
>>  IF dd > 59 + swb THEN dd = dd + 2 - swb
>>  mm = FIX(dd / 61) * 2 + 1
>>  dd = dd MOD 61
>>  IF dd > 31 THEN mm = mm + 1: dd = dd - 31
>>  IF mm > 7 THEN mm = mm - 1
>>  FechaJulDMA = dias
>>  END FUNCTION
>>


--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco


More information about the Coco mailing list