如何获取上个月的第一个日期和最后一个日期?(爪哇)
问题描述:
使用今天的日期,我应该得到上个月的第一个日期和最后一个日期.我无法想出任何逻辑.
With today's date, I should get the first date and last date of the previous month. I am unable to come up with any logic.
例如,通过 05/30/2012
,我应该得到 04/01/2012
和 04/30/2012
.
For example, on passing 05/30/2012
, I should get 04/01/2012
and 04/30/2012
.
任何帮助将不胜感激.谢谢.
Any help will be much appreciated. Thanks.