Initialize a Location instance
Latitude as a decimal, valid range -90 thru +90 (e.g. 41.85003)
Longitude as a decimal, valid range -180 thru +180 (e.g. -87.65005)
in Israel (true) or Diaspora (false)
Olson timezone ID, e.g. "America/Chicago"
OptionalcityName: stringoptional descriptive city name
OptionalcountryCode: stringISO 3166 alpha-2 country code (e.g. "FR")
Optionalgeoid: string | numberoptional string or numeric geographic ID
Optionalelevation: numberin meters (default 0)
Method to get the elevation in Meters.
Returns the elevation in Meters.
Returns the latitude.
Returns the location name.
Returns the longitude.
Returns the location name, up to the first comma
Gets a 24-hour time formatter (e.g. 07:41 or 20:03) for this location
Returns the timeZone.
Method to set the elevation in Meters above sea level.
The elevation to set in Meters. An Error will be thrown if the value is a negative.
The setter method for the display name.
Method to set the TimeZone.
The timeZone to set.
Returns a string representation of an object.
StaticaddAdds a location name for Location.lookup() only if the name isn't
already being used. Returns false if the name is already taken
and true if successfully added.
StaticgetConverts timezone info from Zip-Codes.com to a standard Olson tzid.
two-letter all-caps US state abbreviation like 'CA'
positive number, 5=America/New_York, 8=America/Los_Angeles
single char 'Y' or 'N'
StaticlegacyConverts legacy Hebcal timezone to a standard Olson tzid.
integer, GMT offset in hours
'none', 'eu', 'usa', or 'israel'
StaticlookupCreates a location object from one of 60 "classic" Hebcal city names. The following city names are supported: 'Ashdod', 'Atlanta', 'Austin', 'Baghdad', 'Beer Sheva', 'Berlin', 'Baltimore', 'Bogota', 'Boston', 'Budapest', 'Buenos Aires', 'Buffalo', 'Chicago', 'Cincinnati', 'Cleveland', 'Dallas', 'Denver', 'Detroit', 'Eilat', 'Gibraltar', 'Haifa', 'Hawaii', 'Helsinki', 'Houston', 'Jerusalem', 'Johannesburg', 'Kiev', 'La Paz', 'Livingston', 'Las Vegas', 'London', 'Los Angeles', 'Marseilles', 'Miami', 'Minneapolis', 'Melbourne', 'Mexico City', 'Montreal', 'Moscow', 'New York', 'Omaha', 'Ottawa', 'Panama City', 'Paris', 'Pawtucket', 'Petach Tikvah', 'Philadelphia', 'Phoenix', 'Pittsburgh', 'Providence', 'Portland', 'Saint Louis', 'Saint Petersburg', 'San Diego', 'San Francisco', 'Sao Paulo', 'Seattle', 'Sydney', 'Tel Aviv', 'Tiberias', 'Toronto', 'Vancouver', 'White Plains', 'Washington DC', 'Worcester'
Class representing Location