Sha256: 144e944c9697ceda12207d2fa2f5ffe9518f9f4c2f868608985934c87d94ed52

Contents?: true

Size: 1.24 KB

Versions: 5

Compression:

Stored size: 1.24 KB

Contents

require 'gettext/rails'

class Date
	if Object.respond_to?('_')
		raise "ye"
		MONTHNAMES = [nil, _("January"), _("February"), _("March"), _("April"), _("May"), _("June"), _("July"), _("August"), _("September"), _("October"), _("November"), _("December")]
		DAYNAMES = %w(Sunday Monday Tuesday Wednesday Thursday Friday Saturday)
		ABBR_MONTHNAMES = [nil, _("Jan"), _("Feb"), _("Mar"), _("Apr"), _("May"), _("Jun"), _("Jul"), _("Aug"), _("Sep"), _("Oct"), _("Nov"), _("Dec")]
		ABBR_DAYNAMES = %w(Sun Mon Tue Wed Thu Fri Sat)
	elsif Locale.get.to_s == 'en'
		MONTHNAMES = [nil] + %w(January February March April May June July August September October November December)
		DAYNAMES = %w(Sunday Monday Tuesday Wednesday Thursday Friday Saturday)
		ABBR_MONTHNAMES = [nil] + %w(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)
		ABBR_DAYNAMES = %w(Sun Mon Tue Wed Thu Fri Sat)
	elsif Locale.get.to_s == 'ja'
		MONTHNAMES = [nil] + %w(一月 二月 三月 四月 五月 六月 七月 八月 九月 十月 十一月 十二月)
		DAYNAMES = %w(Sunday Monday Tuesday Wednesday Thursday Friday Saturday)
		ABBR_MONTHNAMES = [nil] + %w(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)
		ABBR_DAYNAMES = %w(Sun Mon Tue Wed Thu Fri Sat)
	else
		raise 'unsupported language'
	end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
smklib-1.2.0 lib/smklib/date_ext.rb
smklib-1.1.2 lib/smklib/date_ext.rb
smklib-1.1.1 lib/smklib/date_ext.rb
smklib-1.1.0 lib/smklib/date_ext.rb
smklib-1.0.6 lib/smklib/date_ext.rb