/** * Util namespace with several helper functions grouped in category classes */ export declare namespace Util { /** * Geohash functions. */ class Geohash { /** * Encodes a latitude-longitude point as a geohash with the given precision. * @param lat Latitude of point * @param lng Longitude of point * @param precision Charcter length of geohash *(defaults to 9)* */ static encode(lat: number, lng: number, precision?: number): string; /** * Decode a given geohash as a latitude-longitude point. * @param geohash The geohash to decode */ static decode(geohash: string): { "latitude": number; "longitude": number; }; /** * Get bounds of geohash * @param geohash The geohash to decode to bounds */ static bounds(geohash: string): any; /** * Is the given geohash (or its upperleftcorner) contained within the given coordinates * @param geohash * @param minlat * @param maxlat * @param minlng * @param maxlng */ static isContained(geohash: string, minlat: number, maxlat: number, minlng: number, maxlng: number): boolean; } /** * Time & data based functions. */ class Time { /** * Returns the unix (UTC) timestamp for the given date parameters. The arguments are considered to be in UTC time. * @param {number} year Four digit number * @param {number} month The month in the year (1-12) * @param {number=} day The day of the month (1-31) * @param {number=} hours The hour of the day (0-23) * @param {number=} minutes The minute of the day (0-59) * @param {number=} seconds The seconds of the day (0-59) * @param {number=} milliseconds The milliseconds of the day (0-999) */ static timestamp(year: number, month: number, day?: number, hours?: number, minutes?: number, seconds?: number, milliseconds?: number): number; /** * Returns the string representation that can be used in the REST api urls. * (eg. 20171205 for December 5, 2017) * @param timestamp The UTC timestamp to convert */ static getDayStr(timestamp: number): string; /** * Returns the string representation that can be used in the REST api urls. * (eg. 20171205/13 for December 5, 2017 at 1pm) * @param timestamp The UTC timestamp to convert */ static getHourStr(timestamp: number): string; /** * Returns an array of 7 string arrays (mon-sun). Each array contains the UTC timestamps for each instance of that weekday in the month. * @param month The month (1-12) */ static getWeekdaysTS(year: number, month: number): number[][]; } }