Sha256: dd90ec16776e261ae2eaf080aa10da7962e4cef671fd5e51554d185b63edefb6

Contents?: true

Size: 628 Bytes

Versions: 1

Compression:

Stored size: 628 Bytes

Contents

# frozen_string_literal: true

module JapaneseCalendar
  module Weekday #:nodoc:
    NAMES = %w[日曜日 月曜日 火曜日 水曜日 木曜日 金曜日 土曜日].freeze

    private_constant :NAMES

    # Calculations module.
    module Calculations
      private

      # Returns a string representing the full name of the day of the week in
      # Japanese ("日曜日").
      def weekday_name
        NAMES[wday]
      end

      # Returns a string representing the abbreviated name of the day of the
      # week in Japanese ("日").
      def weekday_abbreviation
        weekday_name[0]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
japanese_calendar-0.4.2 lib/japanese_calendar/weekday/calculations.rb