method
emit
v1_9_2_180 -
Show latest stable
-
0 notes -
Class: Date
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
emit(e, f)
private
Hide source
# File lib/date/format.rb, line 137 def emit(e, f) # :nodoc: case e when Numeric sign = %(+ + -)[e <=> 0] e = e.abs end s = e.to_s if f[:s] && f[:p] == '0' f[:w] -= 1 end if f[:s] && f[:p] == "\s" s[0,0] = sign end if f[:p] != '-' s = s.rjust(f[:w], f[:p]) end if f[:s] && f[:p] != "\s" s[0,0] = sign end s = s.upcase if f[:u] s = s.downcase if f[:d] s end