Method: When::Coordinates::Temporal::OriginAndUpperDigits#_decode_upper_structure
- Defined in:
- lib/when_exe/coordinates.rb
#_decode_upper_structure(source) ⇒ Array<Numeric>
上の位の除去
2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 |
# File 'lib/when_exe/coordinates.rb', line 2175 def _decode_upper_structure(source) date = source.dup u = 1 s = 0 @index_of_MSC.downto(1) do |i| s += u * (+date[i] - @indices[i-1].base) if (date[i]) u *= @indices[i-1].unit end date[@index_of_MSC] = s + u * (+date[0]) - @origin_of_MSC return date[@index_of_MSC..-1] end |