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.15 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.36 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.14 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.35 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.13 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.34 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.12 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.33 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.11 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.10 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.32 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.9 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.31 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.8 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.30 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.7 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.29 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.6 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.4.28 app/helpers/workarea/admin/date_selector_helper.rb
workarea-admin-3.5.5 app/helpers/workarea/admin/date_selector_helper.rb