Flowdock
method

jd_to_weeknum

Importance_0
Ruby latest stable (v1_9_3_392) - 0 notes - Class: Date

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_330) is shown here.

jd_to_weeknum(jd, f=0, sg=GREGORIAN) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/date.rb, line 474
  def self.jd_to_weeknum(jd, f=0, sg=GREGORIAN) # :nodoc:
    ns = fix_style(jd, sg)
    y, m, d = jd_to_civil(jd, ns)
    a = civil_to_jd(y, 1, 1, ns) + 6
    w, d = (jd - (a - ((a - f) + 1) % 7) + 7).divmod(7)
    return y, w, d
  end
Register or log in to add new notes.