Skip to content
4 changes: 2 additions & 2 deletions Morpher.WebService.V3.Client/Qazaq/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ public string GetOrdinal(string cardinal)
}
}

public string GetDate(string date, bool useOne)
public string GetDate(DateTime dateTime, bool useOne)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Уже была выпущена версия с этим методом. Если его изменить, то поломается обратная совместимость. Лучше добавить новый метод (перегрузку) с параметром DateTime, а этот пометить как Obsolete.

{
using (var client = _newClient())
{
client.AddParam("date", date);
client.AddParam("date", dateTime.ToString());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно отформатировать дату. Иначе можешь получить что-нибудь вроде "21. Juni 2020" в зависимости от региональных настроек ОС.

client.AddParam("use-one", useOne.ToString());
var stringResult = client.GetObject<string>("/qazaq/date");

Expand Down