File: jdate.rb

package info (click to toggle)
tdiary 2.0.1-1sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 7,220 kB
  • ctags: 1,667
  • sloc: ruby: 20,044; lisp: 476; makefile: 91; sql: 32; sh: 31
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