Method: Lazier::DateTime::ClassMethods#unparameterize_zone

Defined in:
lib/lazier/datetime.rb

#unparameterize_zone(tz, as_string = false, dst_label = nil) ⇒ String|TimeZone

Finds a parameterized timezone.

Parameters:

  • tz (String)

    The zone to unparameterize.

  • as_string (Boolean) (defaults to: false)

    If return just the zone name.

  • dst_label (String) (defaults to: nil)

    Label for the DST indication. Defaults to (DST).

Returns:

  • (String|TimeZone)

    The found timezone or nil if the zone is not valid.

See Also:

  • DateTime#parameterize_zone


104
105
106
# File 'lib/lazier/datetime.rb', line 104

def unparameterize_zone(tz, as_string = false, dst_label = nil)
  ::ActiveSupport::TimeZone::unparameterize_zone(tz, as_string, dst_label)
end