Template talk:MJD2DOW

From Meta, a Wikimedia project coordination wiki

Nice, good test for MJD. But in practice, if anybody uses it, then (s)he might be less interested to determine CURRENTDOW by a complex formula using MJD and in turn Timestamp2MJD based on CURRENTTIMESTAMP, if the result modulo 7 for a Sunday is simply CURRENTDOW.

Maybe the template should decree "parameter required", formula includeonly, and the self test based on MJD could be a part of noinclude. Then inclusions don't get three templates where they only want one.

I'm not sure about it, maybe only a case of AUM-TFD-paranoia. -- Omniplex (w:t) 05:00, 22 June 2006 (UTC)[reply]

How sure are we that this is not affected by the MOD bug? Test: 6 2 3 4 5. Purge

16 digits failed sometimes (negative), 15 are also affected (not negative, but "varying" for constant input values). -- Omniplex (w:t) 07:38, 22 June 2006 (UTC)[reply]

I removed the call of MJD and use CURRENTDOW now; I added another mod and a test whether the parameter is an integer, to avoid using a large number as offset.--Patrick 10:40, 22 June 2006 (UTC)[reply]
Yes, hard to decide, in MJD2HMS I kept the dectime default. The optional subst works only for specified parameters. Adding extra #ifeq: magic only for subst hh:mm:ss = now makes no sense in this case.
BTW, MJD2M2 has a problem with large negative arguments, {{MJD2M2|-10000000}} gives 10. I tried to use that for real in the MJD2HMS docu (minimal suppported day number). -- Omniplex (w:t) 14:15, 22 June 2006 (UTC)[reply]
I fixed that in Template:JULIANDAY.MONTH.--Patrick 15:55, 22 June 2006 (UTC)[reply]