groovy - Grails get day of current week and last three weeks -
I found the job of a domain with ID, showing the value of day-to-day match to current. I need to search for the current week's list and the last two weeks before: Today is Monday (04/22) What do I need:
-
Week 1: 06-12 April < / P>
-
Week 2: 13-19 April
-
Current week: April 20-26
Please help, thank you.
Posted here for the poster:
DRF current = New date () Clear time () int current day = calendar. In stains. With {time = get present (calendar.dev_vv}} def listOfDays = (current - 13 - present day) .. (current +7 - current date) listoffends.each {printlian IT}
Print:
Sun Apr 06 00:00:00 BST 2014 Mon Apr 07 00:00: 00 BST 2014 Tuesday April 08 00:00:00 BST 2014 Wed Apr 09 00:00: 00 BST 2014 Thurs 10 April 00 AM 2014 BST 2014 Fri Apr 11 00:00:00 BST 2014 Sat 12 Apr 00:00: 00 BST 2014 Sun Apr 13 00:00:00 BST 2014 Mon Apr 14 0 0:00:00 BST 2014 Tues Apr 15 00:00:00 BST 2014 Wed Apr 16 00:00:00 BST 2014 Thurs Apr 17 00:00: 00 BST 2014 Venus Apr 18 00:00:00 BST 2014 Sat Apr 19 00:00:00 BST 2014 Sun Apr 20 00:00:00 BST 2014 Mon Apr 21 00:00:00 BST 2014 Tuesday April 22 00:00:00 BST 2014 Wed Apr 23 00:00:00 BST 2014 Guru 24 April 00:00:00 BST 2014 Fri Apr 25 00:00:00 BST 2014 Sat Apr 26 00:00:00 BST 2014
Comments
Post a Comment