Sha256: 56683234966bfcf37ee4e87f3a5d48c3c02c7ec81d845d022a1d0dafeaf484d8

Contents?: true

Size: 416 Bytes

Versions: 6

Compression:

Stored size: 416 Bytes

Contents

require 'date'

describe "Date.civil_to_jd" do

  ruby_version_is "" ... "1.9" do
    it "converts a Civil Date to a Julian Day Number" do
      Date.civil_to_jd(-4713, 11, 24).should == 0
      Date.civil_to_jd(2011, 6, 8).should == 2455721
    end

    it "converts a Civil Date to a Julian Day Number using Julian calendar" do
      Date.civil_to_jd(2011, 6, 8, Date::JULIAN).should == 2455734
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubysl-date-2.0.9 spec/date/civil_to_jd_spec.rb
rubysl-date-2.0.8 spec/date/civil_to_jd_spec.rb
rubysl-date-2.0.6 spec/date/civil_to_jd_spec.rb
rubysl-date-2.0.5 spec/date/civil_to_jd_spec.rb
rubysl-date-2.0.3 spec/date/civil_to_jd_spec.rb
rubysl-date-1.0.1 spec/date/civil_to_jd_spec.rb