<div dir="ltr"><div>I'm dealing with the same problem. Using substr() you can split day (d), month (m), and year (y), and after that this algorithm looks like works for me. Returns 0 for a Sunday and up to 6 for a Saturday.<br></div><div><br></div><div>arrayDOW.0=0<br>arrayDOW.1=3<br>arrayDOW.2=2<br>arrayDOW.3=5 <br>arrayDOW.4=0<br>arrayDOW.5=3<br>arrayDOW.6=5<br>arrayDOW.7=1<br>arrayDOW.8=4<br>arrayDOW.9=6 <br>arrayDOW.10=2<br>arrayDOW.11=4</div><div><br></div>if (m<3)<br>y=y-1<br>endif<br><br>parm=m-1<br>dofweek = math_mod((y + math_int(y/4) - math_int(y/100) + math_int(y/400) + arrayDOW.parm + d),7)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Missatge de CW Weather <<a href="mailto:weatherstu@chorleyweather.com">weatherstu@chorleyweather.com</a>> del dia dt., 22 de des. 2020 a les 8:07:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:10pt;font-family:Tahoma,Arial,Helvetica,sans-serif">
<p>Hello Users, </p>
<p><br></p>
<p>I know this subject has been covered recently with an issue with the date for 2021, with the DAY returning '???'. Is there a suitable work around on this for both grads and opengrads users? I know there is a work around with some of you <span>implementing Zeller's congruence but alas I have no idea how to code or where to code it to. </span></p>
<p><br></p>
<p><span>Any help on the matter would be greatly apricated. </span></p>
<div>-- <br>
<p>Kind regards,</p>
<p><strong>Stuart Markham</strong></p>
<p><em><img src="cid:1768b2b0cc16dc6d4101" width="78" height="51"></em></p>
<p><em>Founder of CW Weather</em></p>
<p><em>Website: <a href="https://www.chorleyweather.com/" target="_blank">chorleyweather.com</a></em></p>
</div>
</div>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div>