根据当前日期周获得上周的开始日期和结束日期 [英] to get the last week start date and end date according the curent date week

查看:79
本文介绍了根据当前日期周获得上周的开始日期和结束日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我当前的星期从星期二开始,今天的日期是2010年8月20日,我想要上星期的日期,即上星期的星期二-星期一

等待答复.

Suppose my current week started on Tuesday and today date is 20 aug 2010 the I want the last week date i.e is of last week tuesday - monday

Awaiting for reply.

推荐答案

您应该将有关日期时间类的入门级基本问题汇总为一,或者学习使用Google或购买一本书. datetime类具有星期几"属性,这就是您所需要的.
You should roll of your basic, entry level questions on the date-time class in to one, or perhaps learn to use google, or buy a book. The datetime class has a day of week property, that''s all you need.


您甚至亲自尝试过吗?如果您愿意,那么您将知道这有多简单.

只需查看 DateTime类属性 [
Did you even tried it out yourself? If you would had then you would had known how simple this was.

Just look at the DateTime class properties [^]here and you yourself will see what properties can get you that.


这篇关于根据当前日期周获得上周的开始日期和结束日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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