Class: When::CalendarNote::SovietSixDayWeek

Inherits:
Week show all
Defined in:
lib/when_exe/region/russian.rb

Overview

六曜

Constant Summary collapse

Notes =

暦注要素の定義

[When::BasicTypes::M17n, [
  "locale:[=en:, ja=ja:, alias]",
  "names:[SovietSixDay]",

  # 日の暦注 ----------------------------
  [When::BasicTypes::M17n,
    "names:[day]",
    [When::BasicTypes::M17n,
      "names:[SixDay, 六曜]",
      [DayOfWeek, "label:[Первый=      ]", {'delta'=>6}],
      [DayOfWeek, "label:[Второй=      ]", {'delta'=>6}],
      [DayOfWeek, "label:[Третий=      ]", {'delta'=>6}],
      [DayOfWeek, "label:[Четвертый=]", {'delta'=>6}],
      [DayOfWeek, "label:[Пятый=        ]", {'delta'=>6}],
      [DayOfWeek, "label:[Шестой=      ]", {'delta'=>6}],
      [DayOfWeek, "label:[Out of week=       ]", {'delta'=>6}]
    ]
  ]
]]

Constants inherited from When::CalendarNote

Bahai, CalendarDepend, Chinese, CommonWithRokuyo, CommonWithSovietFiveDay, CommonWithSovietSixDay, Default, Javanese, JulianDay, Mayan, Tibetan, Yis

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 When::CalendarNote

#event

Attributes inherited from TM::ReferenceSystem

#domain_of_validity, #position

Attributes inherited from BasicTypes::Object

#label

Attributes included from Parts::Resource

#child, #keys, #locale, #namespace

Instance Method Summary collapse

Methods inherited from Week

#common_week, #week_labels

Methods inherited from When::CalendarNote

#copy, #day, #duration, #enum_for, #include?, #month, #note?, #notes, #year

Methods inherited from TM::ReferenceSystem

#domain, #name

Methods included from Parts::Resource

#[], #^, _instance, _setup_, _setup_info, base_uri, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #parent, #registered?, root_dir

Methods included from Parts::Resource::Pool

#[], #[]=, #_setup_

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class When::Parts::Resource

Instance Method Details

#sixday(date, base = nil) ⇒ Hash<:value=>When::CalendarNote::Week::DayOfWeek, :position=>Array<Integer>> Also known as: week

この日は何曜?

Parameters:

Returns:



180
181
182
183
184
185
# File 'lib/when_exe/region/russian.rb', line 180

def sixday(date, base=nil)
  date  = _to_date_for_note(date)
  dow   = date.cal_date[When::DAY-1]
  index = dow == 31 ? 6 : (dow - 1) % 6
  {:value=>@days_of_week[index], :position=>[index, WeekLength[(base||date).cal_date[When::MONTH-1]-1]]}
end