Looking to leverage datetime
to get the date of beginning and end of the previous week, sunday to saturday.
So, if it's 8/12/13 today, I want to define a function that prints:
Last Sunday was 8/4/2013 and last Saturday was 8/10/2013
How do I go about writing this?
EDIT: okay, so there seems to be some question about edge cases. For saturdays, I want the same week, for anything else, I'd like the calendar week immediately preceding today
's date.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…