Mistři v programování na #hovnokod

C# #1442

Excelentní práce s datetime. Hned několik chuťovek v jednom.

int fromH = Int32.Parse(from.Value.Split(':')[0]);
int fromM = Int32.Parse(from.Value.Split(':')[1]);
                         
int toH = Int32.Parse(to.Value.Split(':')[0]);
int toM = Int32.Parse(to.Value.Split(':')[1]);

DateTime fromDate = DateTime.Today.AddHours(fromH).AddMinutes(fromM);
DateTime toDate = DateTime.Today.AddHours(toH).AddMinutes(toM);

Anonymous,