class OpenEHR::AssumedLibraryTypes::ISO8601Timezone

Public Class Methods

new(string) click to toggle source
# File lib/openehr/assumed_library_types.rb, line 551
def initialize(string)
  @timezone = Timezone.new(string)
end

Public Instance Methods

as_string() click to toggle source
# File lib/openehr/assumed_library_types.rb, line 575
def as_string
  if @timezone.hour < 0
    s = ''
  else
    s = '+'
  end
  sprintf("%s%02d%02d", s, @timezone.hour, @timezone.minute)
end
Also aliased as: to_s
gmt?()
Alias for: is_gmt?
hour() click to toggle source
# File lib/openehr/assumed_library_types.rb, line 555
def hour
  return @timezone.hour
end
is_gmt?() click to toggle source
# File lib/openehr/assumed_library_types.rb, line 571
def is_gmt?
  return (@timezone.hour == 0 and @timezone.minute == 0)
end
Also aliased as: gmt?
minute() click to toggle source
# File lib/openehr/assumed_library_types.rb, line 559
def minute
  return @timezone.minute
end
sign() click to toggle source
# File lib/openehr/assumed_library_types.rb, line 563
def sign
  if @timezone.hour < 0
    return -1
  else
    return +1
  end
end
to_s()
Alias for: as_string