Sha256: bbb3edfcd1c731488073e2db348a9154b05798fdda041610b51f0b3972fc3f63

Contents?: true

Size: 282 Bytes

Versions: 14

Compression:

Stored size: 282 Bytes

Contents

require 'ndr_support/ourdate'

# Extend Fixnum for use in our Daterange class
class Fixnum
  # 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

14 entries across 14 versions & 1 rubygems

Version Path
ndr_support-5.3.1 lib/ndr_support/fixnum/julian_date_conversions.rb
ndr_support-5.3.0 lib/ndr_support/fixnum/julian_date_conversions.rb
ndr_support-5.2.0 lib/ndr_support/fixnum/julian_date_conversions.rb
ndr_support-5.1.0 lib/ndr_support/fixnum/julian_date_conversions.rb
ndr_support-4.2.0 lib/ndr_support/fixnum/julian_date_conversions.rb
ndr_support-5.0.0 lib/ndr_support/fixnum/julian_date_conversions.rb
ndr_support-4.1.2 lib/ndr_support/fixnum/julian_date_conversions.rb
ndr_support-4.1.1 lib/ndr_support/fixnum/julian_date_conversions.rb
ndr_support-4.0.1 lib/ndr_support/fixnum/julian_date_conversions.rb
ndr_support-4.0.0 lib/ndr_support/fixnum/julian_date_conversions.rb
ndr_support-3.3.0 lib/ndr_support/fixnum/julian_date_conversions.rb
ndr_support-3.2.1 lib/ndr_support/fixnum/julian_date_conversions.rb
ndr_support-3.2.0 lib/ndr_support/fixnum/julian_date_conversions.rb
ndr_support-3.1.1 lib/ndr_support/fixnum/julian_date_conversions.rb