New answers tagged

1

I agree with your summation that it is clumsy. I see you like to stringly type objects, such as GetTimeOfDayFromDateTime. It would be neater to just get the time of day as a TimeSpan. Also, you may have several overloads accepting different input arguments, so you don't need to include the FromDateTime in the name. public static TimeSpan GetTimeOfDay(...


0

To preface, PEP8 recommends 4 spaces instead of 2 spaces for indentation, so I've written all below code as such. There is a subtle bug in your program (and may be nonexistent at all, the requirements are ambiguous here), but: if elem['date'] < mod_arr[mod_index]['date']: elem['value'] += mod_arr[mod_index]['value'] else: elem['value'] += ...


Top 50 recent answers are included