method
_valid_weeknum?

v1_9_2_180 -
Show latest stable
-
0 notes -
Class: Date
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 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?
_valid_weeknum?(y, w, d, f, sg=GREGORIAN)
public
Hide source
# File lib/date.rb, line 658 def _valid_weeknum? (y, w, d, f, sg=GREGORIAN) # :nodoc: if d < 0 d += 7 end if w < 0 ny, nw, nd, nf = jd_to_weeknum(weeknum_to_jd(y + 1, 1, f, f, sg) + w * 7, f, sg) return unless ny == y w = nw end jd = weeknum_to_jd(y, w, d, f, sg) return unless [y, w, d] == jd_to_weeknum(jd, f, sg) jd end