method
s3e
v1_8_7_72 -
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?
s3e(e, y, m, d, bc=false)
private
Hide source
# File lib/date/format.rb, line 626 def self.s3e(e, y, m, d, bc=false) unless String === m m = m.to_s end if y && m && !d y, m, d = d, y, m end if y == nil if d && d.size > 2 y = d d = nil end if d && d[0,1] == "'" y = d d = nil end end if y y.scan(/(\d+)(.+)?/) if $2 y, d = d, $1 end end if m if m[0,1] == "'" || m.size > 2 y, m, d = m, d, y # us -> be end end if d if d[0,1] == "'" || d.size > 2 y, d = d, y end end if y y =~ /([-+])?(\d+)/ if $1 || $2.size > 2 c = false end iy = $&.to_i if bc iy = -iy + 1 end e.year = iy end if m m =~ /\d+/ e.mon = $&.to_i end if d d =~ /\d+/ e.mday = $&.to_i end if c != nil e._comp = c end end