public async getRegDate(
id: number,
config?: Omit<AxiosRequestConfig, "method" | "url">
): Promise<Date> {
const data = (
await axios({
url: `https://vk.com/foaf.php?id=${id}`,
method: "GET",
...config,
})
).data as string;
const firstIndex = data.indexOf("<ya:modified dc:date=") + 23;
const secondIndex = data.indexOf('"/>', firstIndex);
return new Date(data.substring(firstIndex, secondIndex));
}
}