Module: NexusCore::ReportUtils::DateDefinition
- Included in:
- NexusCore::ReportUtils
- Defined in:
- lib/nexus_core/report_utils.rb
Instance Method Summary collapse
- #end_of_last_month ⇒ Object
- #end_of_last_week ⇒ Object
- #last_week ⇒ Object
- #starting_last_month ⇒ Object
- #this_week ⇒ Object
Instance Method Details
#end_of_last_month ⇒ Object
16 17 18 |
# File 'lib/nexus_core/report_utils.rb', line 16 def end_of_last_month Date.today.last_month.end_of_month end |
#end_of_last_week ⇒ Object
12 13 14 |
# File 'lib/nexus_core/report_utils.rb', line 12 def end_of_last_week Date.today.last_week.end_of_week end |
#last_week ⇒ Object
8 9 10 |
# File 'lib/nexus_core/report_utils.rb', line 8 def last_week Date.today.last_week.strftime('%Y%W') end |
#starting_last_month ⇒ Object
20 21 22 |
# File 'lib/nexus_core/report_utils.rb', line 20 def starting_last_month Date.today.last_month.beginning_of_month end |
#this_week ⇒ Object
4 5 6 |
# File 'lib/nexus_core/report_utils.rb', line 4 def this_week Date.today.strftime('%Y%W') end |