Sha256: f778c8858281c25ce6cc67edd3d807c2d197e7d3f3e070625d1e56e2cf2e645e

Contents?: true

Size: 1.75 KB

Versions: 62

Compression:

Stored size: 1.75 KB

Contents

module Workarea
  module Admin
    module DateSelectorHelper
      def date_selector_quick_range_options
        [
          [t('workarea.admin.date_selector.a_range')],
          [t('workarea.admin.date_selector.today'), Date.current.strftime('%F')],
          [
            t('workarea.admin.date_selector.yesterday'),
            1.day.ago.strftime('%F')
          ],
          [
            t('workarea.admin.date_selector.last_week'),
            [
              1.week.ago.beginning_of_week.strftime('%F'),
              1.week.ago.end_of_week.strftime('%F')
            ].join('|')
          ],
          [
            t('workarea.admin.date_selector.last_month'),
            [
              1.month.ago.beginning_of_month.strftime('%F'),
              1.month.ago.end_of_month.strftime('%F')
            ].join('|')
          ],
          [
            t('workarea.admin.date_selector.week_to_date'),
            [
              Date.current.beginning_of_week.strftime('%F'),
              Date.current.strftime('%F')
            ].join('|')
          ],
          [
            t('workarea.admin.date_selector.month_to_date'),
            [
              Date.current.beginning_of_month.strftime('%F'),
              Date.current.strftime('%F')
            ].join('|')
          ],
          [
            t('workarea.admin.date_selector.quarter_to_date'),
            [
              Date.current.beginning_of_quarter.strftime('%F'),
              Date.current.strftime('%F')
            ].join('|')
          ],
          [
            t('workarea.admin.date_selector.year_to_date'),
            [
              Date.current.beginning_of_year.strftime('%F'),
              Date.current.strftime('%F')
            ].join('|')
          ]
        ]
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.26 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.45 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.25 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.23 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.44 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.22 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.43 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.21 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.42 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.20 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.41 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.19 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.40 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.18 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.39 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.17 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.38 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.16 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.37 app/helpers/workarea/admin/date_selector_helper.rb