我使用函数来显示估算交货时间,如下所示:
// [tomorrow]
function displaydate_tomorrow(){
return date_i18n('l, j. F', strtotime('+1 day'));
}
add_shortcode('tomorrow', 'displaydate_tomorrow');
// end tomorrows date
,并且效果很好,但是问题是我需要从字符串中排除“ Sunday”。有可能做到这一点。
谢谢
答案 0 :(得分:3)
您可以先检查明天是否是星期日。如果是星期天,请在接下来的两天而不是第二天。
Sub SharepointAddFolder()
Dim filePath As String
filePath = "https://web.site.com/SharedDocuments/Folder"
'filePath = Replace(filePath, "https:", "") 'I didn't need these but who knows
'filePath = Replace(filePath, "/", "\")
'filePath = Replace(filePath, " ", "%20")
Dim newFolderName As String
newFolderName = "New Folder"
Dim driveLetter As String
driveLetter = "Z:"
Dim ntwk As Object
Set ntwk = CreateObject("WScript.Network")
On Error GoTo ErrHandler
ntwk.MapNetworkDrive driveLetter, filePath, False ', "username", "password"
If Len(Dir(driveLetter & "/" & newFolderName, vbDirectory)) = 0 Then
MkDir driveLetter & "/" & newFolderName
Else
MsgBox "Folder " & newFolderName & " already exists."
End If
ExitThis:
ntwk.RemoveNetworkDrive driveLetter
Exit Sub
ErrHandler:
Select Case Err.Number
Case -2147024829
MsgBox "Sharepoint site not found"
Case 76
'sharepoint directory not found
MsgBox "Mapping failed"
Case -2147024811
'drive already mapped
Resume Next
Case -2147022646
'drive not found and thus cannot be closed
Case -2147022495
MsgBox "This network connection has files open or requests pending." & vbNewLine & vbNewLine & _
"Either close the files or wait until the files are closed, then try to cancel the connection."
Case Else
MsgBox "Error " & Err.Number & ": " & vbNewLine & Err.Description
End Select
End Sub