Sha256: 927a6768d4d5f45d51b300c10a0f89901db2ab6e70848411bc26c051c0b94575

Contents?: true

Size: 284 Bytes

Versions: 9

Compression:

Stored size: 284 Bytes

Contents

require 'ndr_support/ourdate'

# Extend Integer for use in our Daterange class
class Integer
  # Julian date number to Ruby Date
  def jd_to_date
    Date.jd(self)
  end

  def jd_to_datetime
    date = jd_to_date
    Ourdate.build_datetime(date.year, date.month, date.day)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ndr_support-5.7.1 lib/ndr_support/integer/julian_date_conversions.rb
ndr_support-5.7.0 lib/ndr_support/integer/julian_date_conversions.rb
ndr_support-5.6.1 lib/ndr_support/integer/julian_date_conversions.rb
ndr_support-5.6.0 lib/ndr_support/integer/julian_date_conversions.rb
ndr_support-5.5.1 lib/ndr_support/integer/julian_date_conversions.rb
ndr_support-5.5.0 lib/ndr_support/integer/julian_date_conversions.rb
ndr_support-5.4.2 lib/ndr_support/integer/julian_date_conversions.rb
ndr_support-5.4.1 lib/ndr_support/integer/julian_date_conversions.rb
ndr_support-5.3.2 lib/ndr_support/integer/julian_date_conversions.rb