test/test/region/chinese.rb in when_exe-0.3.2 vs test/test/region/chinese.rb in when_exe-0.3.3
- old
+ new
@@ -1,19 +1,19 @@
# -*- coding: utf-8 -*-
=begin
- Copyright (C) 2011-2013 Takashi SUGA
+ Copyright (C) 2011-2014 Takashi SUGA
You may use and/or modify this file according to the license
described in the LICENSE.txt file included in this archive.
=end
module Test
class Chinese < Test::Unit::TestCase
def test_chinese_date
- emd = When.Resource('_c:EphemerisBasedSolar')
+ emd = When.Resource('_c:EphemerisBasedSolar?time_basis=+09:00')
date = When.when?('2009-01-01', {:frame=>emd})
[
["2009-01-01", 2454867],
["2009-02-01", 2454896],
["2009-03-01", 2454927],
@@ -29,11 +29,11 @@
].each do |sample|
assert_equal(sample, [date.to_s, date.to_i])
date += When.Duration('P1M')
end
- cc = When::CalendarTypes::ChineseLuniSolar.new({'timezone'=>9})
+ cc = When::CalendarTypes::ChineseLuniSolar.new({'time_basis'=>'+09:00'})
date = When.when?('2009-01-01', {:frame=>cc})
[
["2009-01-01", 2454858],
["2009-02-01", 2454888],
["2009-03-01", 2454918],
@@ -89,10 +89,10 @@
].each do |sample|
assert_equal(sample, [date.to_s, date.to_i])
date += When.Duration('P1M')
end
- cc = When::CalendarTypes::ChineseLuniSolar.new({'timezone'=>9, 'intercalary_span'=>3})
+ cc = When::CalendarTypes::ChineseLuniSolar.new({'time_basis'=>'+09:00', 'intercalary_span'=>3})
date = When.when?('2728-11-01', {:frame=>cc})
[
["2728-11-01", 2717768],
["2728-12-01", 2717798],
["2729-01-01", 2717827],