Class: When::Coordinates::Kyusei
- Inherits:
-
Residue
- Object
- BasicTypes::Object
- Residue
- When::Coordinates::Kyusei
- Defined in:
- lib/when_exe/region/residue.rb,
lib/when_exe/region/japanese/residues.rb
Overview
九星
Constant Summary collapse
- StartOfSequence =
{-1=>'九星陽遁始め', +1=>'九星陰遁始め'}
- Patch =
{2421371=>2421431, 2429771=>2429831, 2463251=>2463191, 2475851=>2475791}
Constants inherited from Residue
Residue::HashProperty, Residue::LabelProperty
Constants included from Parts::Resource
Parts::Resource::ConstList, Parts::Resource::ConstTypes, Parts::Resource::IRIDecode, Parts::Resource::IRIDecodeTable, Parts::Resource::IRIEncode, Parts::Resource::IRIEncodeTable, Parts::Resource::IRIHeader, Parts::Resource::LabelProperty
Constants included from Namespace
Namespace::DC, Namespace::DCQ, Namespace::DCT, Namespace::FOAF, Namespace::OWL, Namespace::RDF, Namespace::RDFC, Namespace::RDFS, Namespace::RSS, Namespace::XSD
Instance Attribute Summary
Attributes inherited from Residue
#carry, #divisor, #remainder, #shifted, #units
Attributes inherited from BasicTypes::Object
Attributes included from Parts::Resource
#_pool, #child, #keys, #locale, #namespace
Class Method Summary collapse
-
.day(date, s_terms) ⇒ Integer
日の九星のインデックス.
-
.is_turn?(date, s_terms) ⇒ String
陰遁・陽遁折り返し日か?.
-
.month(m) ⇒ Integer
月の九星のインデックス.
-
.year(y) ⇒ Integer
年の九星のインデックス.
Methods inherited from Residue
#%, #&, #+, #-, #<<, #>>, #[], _china, #_column_for_week_included, _day_of_week, #_enumerator, #_range_for_week_included, day_of_week, #difference, #duration, #event, #initialize, mod, #to, #to_m17n, #to_s
Methods included from Parts::Resource
#[], #^, _abbreviation_to_iri, _decode, _encode, _extract_prefix, _instance, _instantiate, _parse, _path_with_prefix, _replace_tags, _setup_, _setup_info, _simplify_path, base_uri, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #parent, #registered?, root_dir
Methods included from Parts::Resource::Pool
#[], #[]=, #_pool, #_setup_, #pool_keys
Methods included from Parts::Resource::Synchronize
Constructor Details
This class inherits a constructor from When::Coordinates::Residue
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class When::Coordinates::Residue
Class Method Details
.day(date, s_terms) ⇒ Integer
日の九星のインデックス
51 52 53 54 55 56 |
# File 'lib/when_exe/region/japanese/residues.rb', line 51 def day(date, s_terms) thres, delta, sign = _parameters(date, s_terms) delta += 3 if thres == 30 delta = 8 - delta if sign < 0 return delta % 9 end |
.is_turn?(date, s_terms) ⇒ String
陰遁・陽遁折り返し日か?
66 67 68 69 70 |
# File 'lib/when_exe/region/japanese/residues.rb', line 66 def is_turn?(date, s_terms) thres, delta, sign = _parameters(date, s_terms) return nil unless thres == delta StartOfSequence[sign] end |
.month(m) ⇒ Integer
月の九星のインデックス
39 40 41 |
# File 'lib/when_exe/region/japanese/residues.rb', line 39 def month(m) (m + 2) % 9 end |
.year(y) ⇒ Integer
年の九星のインデックス
28 29 30 |
# File 'lib/when_exe/region/japanese/residues.rb', line 28 def year(y) (y + 2) % 9 end |