|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
自己小顶下,迫切需要解决~~~
Bump myself up a bit, urgently need to solve~~~
|
|
2007-4-10 05:15 |
|
|
flyinspace
银牌会员
    
积分 1206
发帖 517
注册 2007-3-25
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
呵呵,不好意思。你需要的代码比较长。
我没有那么多工夫调试出来。
做好最低的要求。
知道每个月有多少天。。(可以通过定义)
对于2月则判断当年是否闰年(
然后取当天的日期然后决定是否日期加减一。
月份是否进一,年份是否进一。
都是考虑的范围内。
Hehe, sorry. The code you need is relatively long. I don't have so much time to debug it out.
Do the minimum required.
Know how many days are in each month. (Can be defined)
For February, then judge whether the current year is a leap year (
Then take the current date and then decide whether to add or subtract one day.
Whether the month should be incremented, whether the year should be incremented.
All are within the scope of consideration.
|

知,不觉多。不知,乃求知 |
|
2007-4-10 09:03 |
|
|
zh159
金牌会员
     
积分 3687
发帖 1467
注册 2005-8-8
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
Originally posted by lililulula at 2007-4-9 14:59:
你一说倒真是这样,我后来也看了2楼的脚本也有着个问题,我的脚本也有这个问题,不过3楼的vbs脚本没问题,有wekekday这个自带参数~~~~,看来考虑问题没考虑 ...
下一个工作日.vbs
dim Wday,today
today=date
Wday=Weekday(now)
Select Case (Wday)
case 1 today=today+1
case 2 today=today+1
case 3 today=today+1
case 4 today=today+1
case 5 today=today+1
case 6 today=today+3
case 7 today=today+2
end select
WScript.echo CDate(today)
bat
@echo off
for /f "delims=" %%i in ('"cscript //nologo 下一个工作日.vbs"') do echo %%i
pause
Originally posted by lililulula at 2007-4-9 14:59:
It's really like that when you mention it. I also looked at the script on floor 2 later and had this problem. My script also has this problem. However, the vbs script on floor 3 is okay. There is a built-in parameter called wekekday~~~~,看来考虑问题没考虑 ...
Next Working Day.vbs
dim Wday,today
today=date
Wday=Weekday(now)
Select Case (Wday)
case 1 today=today+1
case 2 today=today+1
case 3 today=today+1
case 4 today=today+1
case 5 today=today+1
case 6 today=today+3
case 7 today=today+2
end select
WScript.echo CDate(today)
bat
@echo off
for /f "delims=" %%i in ('"cscript //nologo 下一个工作日.vbs"') do echo %%i
pause
|
|
2007-4-10 09:44 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
谢谢zh159给予取vbs脚本变量的方法~~十分感谢,bat脚本实现我再慢慢思考,貌似难度很大,如果有高手知道,还请赐教~~~~~~
Last edited by lililulula on 2007-4-10 at 11:09 AM ]
Thanks to zh159 for providing the method of getting VBS script variables~~ Thanks a lot, I'll think about implementing it with batch scripts slowly. It seems quite difficult. If any expert knows, please do give advice~~~~~~
Last edited by lililulula on 2007-4-10 at 11:09 AM ]
|
|
2007-4-10 23:37 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
不过还有个问题就是取来的变量我能否取掉2007-04-10中间的横线
我试了下取来再用date变量去横线,时间就变回了系统时间,只要一使用date函数,vbs脚本中不知道如何去除横线,望知道的朋友帮个忙
But there is another problem, can I remove the horizontal line in 2007-04-10 from the retrieved variable? I tried to retrieve it and then use the date variable to remove the horizontal line, but the time returned to the system time. As soon as I use the date function, I don't know how to remove the horizontal line in the VBS script. I hope friends who know can help.
|
|
2007-4-11 00:34 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
去横线问题已经解决,前面没怎么思考,现在想通了 谢谢大家帮忙.
The problem of the horizontal line has been solved. I didn't think much about it before, but now I've figured it out. Thanks everyone for your help.
|
|
2007-4-11 03:00 |
|