Private Sub Clock_Tick
Log("dia: ",dia,"mes: ",mes,"año",anno)
'Log("Date: ", TimeNIST.GetDate)
Log("Time (UTC): ", NumberFormat(TimeNIST.GetHours, 2, 0), ":", NumberFormat(TimeNIST.GetMinutes, 2, 0), _
":", NumberFormat(TimeNIST.GetSeconds, 2, 0))
Log("Dia de la semana: ",DiaDeLaSemana(dia,mes,anno))
End Sub
Sub DiaDeLaSemana ( t_dia As Int, t_mes As Int, t_year As Int) As Byte 'Domingo = 0
Private dow As Byte
'Private t_mes As Byte 'mes temporal
Select t_mes
Case 1,10
t_mes = 0
Exit
Case 2,3,11
t_mes = 3
Exit
Case 4,7
t_mes = 6
Exit
Case 5
t_mes = 1
Exit
Case 6
t_mes = 4
Exit
Case 8
t_mes = 2
Exit
Case 9,12
t_mes = 5
Exit
End Select
dow = t_dia + t_mes + t_year + (t_year/4) + 6 'el 6 es el siglo 2000 2099
Return dow Mod 7
End Sub