File: jdate.rb

package info (click to toggle)
tdiary 2.0.2%2B20060303-5
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 8,172 kB
  • ctags: 1,957
  • sloc: ruby: 23,926; lisp: 514; makefile: 87; sh: 71; sql: 32
file content (20 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# jdate.rb $Revision: 1.1 $
#
#%Jפܸ̾Ф
#    pluginư롣
#    եեޥåȤʤɤǡ%JפꤹȤܸˤʤ
#
# Copyright (c) 2003 TADA Tadashi <sho@spc.gr.jp>
# You can distribute this file under the GPL.
#
unless Time::new.respond_to?( :strftime_jdate_backup ) then
	eval( <<-MODIFY_CLASS, TOPLEVEL_BINDING )
		class Time
		   alias strftime_jdate_backup strftime
		   JWDAY = %w(      )
		   def strftime( format )
		      strftime_jdate_backup( format.gsub( /%J/, JWDAY[self.wday] ) )
		   end
		end
	MODIFY_CLASS
end