如何计算下周三日期的给定日期 [英] How Can I Calculate Given Date Into Next Wednesday Date

查看:122
本文介绍了如何计算下周三日期的给定日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码在这里:

函数validatedate(inputText)

{

//某些代码是thr



document.form1.penh1.value = setMyDateFormat(dt.wedDate());

document.form1.penh2.value = setMyDateFormat(dt.wedDate() );

document.form1.penh3.value = setMyDateFormat(dt.wedDate());



Date.prototype.wedDate = function ()

{

this.setDate(this.getDate()+ 3);

返回此内容;

}



< body>

//某些代码是thr / /
< / body>

< / html>

My code is here:
function validatedate(inputText)
{
// Some code is thr

document.form1.penh1.value=setMyDateFormat(dt.wedDate());
document.form1.penh2.value=setMyDateFormat(dt.wedDate());
document.form1.penh3.value=setMyDateFormat(dt.wedDate());

Date.prototype.wedDate=function()
{
this.setDate(this.getDate()+3);
return this;
}

<body>
//some code is thr
</body>
</html>

推荐答案

试试这个: DateTime Extensions使一些简单的任务更容易阅读 [ ^ ] - 它包括做这种事的方法!





:doh:

没有请注意,您需要使用Javascript!



请在此处查看: - 该周中的JavaScript天的http://stackoverflow.com/questions/3638906/get-date-of-specific-day-of-the-week-in-javascript [< a href =http://stackoverflow.com/questions/3638906/get-date-of-specific-day-of-the-week-in-javascripttarget =_ blanktitle =New Window> ^ ]

[/ edit]
Try this: DateTime Extensions to Make Some Simple Tasks a Little More Readable[^] - it includes methods to do that kind of thing!

[edit]
:doh:
Didn't notice you need Javascript!

See here instead: http://stackoverflow.com/questions/3638906/get-date-of-specific-day-of-the-week-in-javascript[^]
[/edit]


这篇关于如何计算下周三日期的给定日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆