代 码:
Public Function IsWorkDay(wDate As Date) As Boolean
On Error Resume Next
Dim strResponse As String
Dim URL As String
With CreateObject("msxml2.xmlhttp")
URL = "http://timor.tech/api/holiday/info/" & Format(wDate, "yyyy-mm-dd") & "/"
.Open "get", URL, False
.send
IsWorkDay = (Replace(.responsetext, """", "") Like "*type:0*")
End With
End Function
效 果:
附 件:
点击下载此附件
演 示: