Class: When::V::Timezone
- Inherits:
-
Root
- Object
- BasicTypes::Object
- Root
- When::V::Timezone
- Extended by:
- Parts::Resource::Pool
- Includes:
- Parts::Timezone::Base
- Defined in:
- lib/when_exe/icalendar.rb
Overview
Timezone を定義する
BEGIN:VTIMEZONE...END:VTIMEZONE のブロックに対応
Constant Summary collapse
- Properties =
[['tzid'], [], ['last_modified', 'tzurl', 'x_lic_location'], [], []]
- Classes =
[Standard, Daylight]
Constants inherited from Root
Root::AwareProperties, Root::DefaultOptional, Root::DefaultUnique
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 included from Parts::Timezone::Base
#daylight, #standard, #tz_difference
Attributes inherited from Root
Attributes included from Parts::Resource
#child, #keys, #locale, #namespace
Instance Method Summary collapse
-
#current_period(current_date = Time.now) ⇒ Range
同一の時間帯を用いた期間.
-
#label ⇒ String
ユニーク識別名 - TZID Property をユニーク識別名とする.
Methods included from Parts::Resource::Pool
Methods included from Parts::Timezone::Base
Methods inherited from Root
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
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class When::Parts::Resource
Instance Method Details
#current_period(current_date = Time.now) ⇒ Range
同一の時間帯を用いた期間
1019 1020 1021 1022 1023 1024 1025 |
# File 'lib/when_exe/icalendar.rb', line 1019 def current_period(current_date=Time.now) current_date = When.when?(current_date) unless current_date.kind_of?(When::TM::TemporalPosition) period = _tz_period(current_date.universal_time) range = period[1] return range if range.kind_of?(Range) GeometricComplex.new([period], !range) end |
#label ⇒ String
ユニーク識別名 - TZID Property をユニーク識別名とする
1007 1008 1009 |
# File 'lib/when_exe/icalendar.rb', line 1007 def label @label ||= @property['tzid'].object end |