Sha256: 370ce3763b92dbcf9666ee7a0e5177b45826a57095aa7419cb000b8a6f1dfd0b

Contents?: true

Size: 748 Bytes

Versions: 52

Compression:

Stored size: 748 Bytes

Contents

# jmonth.rb $Revision: 1.1 $
#
#「%i」で日本語の陰暦月名を出す
#    pluginに入れるだけで動作する。
#    日付フォーマットなどで「%i」を指定するとそこが陰暦月名になる
#
# Copyright (c) 2005 sasasin/SuzukiShinnosuke<sasasin@sasasin.sytes.net>
# You can distribute this file under the GPL.
#
unless Time::new.respond_to?( :strftime_jmonth_backup ) then
	eval( <<-MODIFY_CLASS, TOPLEVEL_BINDING )
		class Time
		   alias strftime_jmonth_backup strftime
		   JMONTH = %w(睦月 如月 弥生 卯月 皐月 水無月 文月 葉月 長月 神無月 霜月 師走)
		   def strftime( format )
		      strftime_jmonth_backup( format.gsub( /%i/, JMONTH[self.month-1] ) )
		   end
		end
	MODIFY_CLASS
end

Version data entries

52 entries across 46 versions & 2 rubygems

Version Path
tdiary-contrib-5.0.10 plugin/jmonth.rb
tdiary-contrib-5.0.9 plugin/jmonth.rb
tdiary-contrib-5.0.8 plugin/jmonth.rb
tdiary-contrib-5.0.7 plugin/jmonth.rb
tdiary-contrib-5.0.6 plugin/jmonth.rb
tdiary-contrib-5.0.5 plugin/jmonth.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/bundler/gems/tdiary-contrib-8299b30cbf3f/plugin/jmonth.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-fa9c20aa0d97/plugin/jmonth.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-f08988dfa0f6/plugin/jmonth.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-a3c5f37278c4/plugin/jmonth.rb
tdiary-5.0.5 vendor/bundle/bundler/gems/tdiary-contrib-8299b30cbf3f/plugin/jmonth.rb
tdiary-contrib-5.0.4 plugin/jmonth.rb
tdiary-5.0.4 vendor/bundle/bundler/gems/tdiary-contrib-8299b30cbf3f/plugin/jmonth.rb
tdiary-contrib-5.0.3 plugin/jmonth.rb
tdiary-contrib-5.0.2 plugin/jmonth.rb
tdiary-contrib-5.0.1 plugin/jmonth.rb
tdiary-contrib-5.0.0 plugin/jmonth.rb
tdiary-contrib-4.2.1 plugin/jmonth.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/bundler/gems/tdiary-contrib-2ab36447ae2a/plugin/jmonth.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/bundler/gems/tdiary-contrib-d189eb6688f1/plugin/jmonth.rb