如何从当天获得下一个星期一的日期? [英] How can I get the date of the next monday from the current day?

查看:107
本文介绍了如何从当天获得下一个星期一的日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从当天获取下一个星期一的日期?请指教。

How can I get the date of the next monday from current day? Please advice.

推荐答案

参考: http: //stackoverflow.com/questions/6346119/datetime-get-next-tuesday [ ^ ]


您可以使用Property
You could use the Property
DateTime.DayOfWeek

来获取当天,计算出下周一的天数。这个枚举从星期日的0开始。

to get the current day and work out how many days until the next Monday. This enumeration start at 0 for Sunday.


这篇关于如何从当天获得下一个星期一的日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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