Class: RiCal::PropertyValue::ZuluDateTime

Inherits:
DateTime show all
Defined in:
lib/ri_cal/property_value/zulu_date_time.rb

Overview

RiCal::PropertyValue::CalAddress represents an icalendar CalAddress property value which is defined in RFC 2445 section 4.3.5 pp 35-37

Instance Attribute Summary

Attributes inherited from RiCal::PropertyValue

#params, #timezone_finder, #value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DateTime

#<=>, #==, #add_date_times_to, civil, #cmp_fast_date_time_value, #day, #days_in_month, default_tzid, default_tzid=, default_tzid_hash, #fast_date_tme, #for_occurrence, #for_parent, from_string, #hour, #in_same_month_as?, #inspect, #iso_weeks_in_year, #iso_year_and_week_one_start, #min, #month, #nth_wday_in_month, #nth_wday_in_year, #occurrence_period, or_date, #params, #params=, params_for_tzid, #ruby_value, #sec, #start_of_day?, time_and_parameters, #to_datetime, #to_ri_cal_date_or_date_time_value, #to_ri_cal_date_time_value, #to_ri_cal_date_value, #to_zulu_occurrence_range_finish_time, #to_zulu_occurrence_range_start_time, #to_zulu_time, valid_string?, #value, #visible_params, #wday, #with_date_time_value, #year

Methods included from DateTime::TimeMachine

#advance, #at_end_of_iso_year, #at_start_of_iso_year, #at_start_of_next_iso_year, #at_start_of_week_with_wkst, #change, #change_day, #change_hour, #change_min, #change_month, #change_sec, #change_year, #end_of_day, #end_of_hour, #end_of_iso_year, #end_of_minute, #end_of_month, #end_of_week_with_wkst, #end_of_year, #in_month, #in_week_starting?, #start_of_day, #start_of_hour, #start_of_minute, #start_of_month, #start_of_week_with_wkst, #start_of_year

Methods included from DateTime::TimezoneSupport

#find_timezone, #floating?, #has_local_timezone?, #has_valid_tzinfo_tzid?, #in_time_zone, #rational_tz_offset, #reset_cached_values, #timezone, #tzid=, #utc, #utc?, #with_floating_timezone

Methods included from DateTime::AdditiveMethods

#+, #-, #add_to_date_time_value, #duration_until, #subtract_from_date_time_value

Methods inherited from RiCal::PropertyValue

#==, #add_date_times_to, date_or_date_time, date_or_date_time_or_period, #default_tzid, #enumerator, #equality_value, #find_timezone, #for_parent, if_valid_string, #initialize, #parms_string, #ruby_value, #to_options_hash, #to_ri_cal_property_value, #to_s, #tz_info_source?, #validate_value, #visible_params

Constructor Details

This class inherits a constructor from RiCal::PropertyValue

Class Method Details

.convert(timezone_finder, ruby_object) ⇒ Object

:nodoc:



25
26
27
28
# File 'lib/ri_cal/property_value/zulu_date_time.rb', line 25

def self.convert(timezone_finder, ruby_object) # :nodoc:
    result = super
    result.to_ri_cal_zulu_date_time
end

Instance Method Details

#to_ri_cal_zulu_date_timeObject



21
22
23
# File 'lib/ri_cal/property_value/zulu_date_time.rb', line 21

def to_ri_cal_zulu_date_time
  self
end

#tzidObject



8
9
10
# File 'lib/ri_cal/property_value/zulu_date_time.rb', line 8

def tzid
  "UTC"
end

#value=(val) ⇒ Object

:nodoc:



12
13
14
15
16
17
18
19
# File 'lib/ri_cal/property_value/zulu_date_time.rb', line 12

def value=(val) # :nodoc:
  if DateTime === val
    @date_time_value = val
  else
    super(val)
  end
  @date_time_value = @date_time_value.utc if @date_time_value
end