#function ConvertTime

1 messages · Page 1 of 1 (latest)

copper orchid
#

that function makes no sense.

  1. lines 5 and 7 are identical
  2. Why are you replacing second, hour, etc. with literally the same exact thing
  3. You return the timespan as a string, but you don't need to? Depending on what you're using, you can just convert it when you need to, no function needed
magic ermine
#

What is this

#

The way I think I did it last was getting the seconds of yourTimespan and then doing math

#

Ie, take the maximum multiple of 86400 out of it, thats the days. Then 3600 for hours and 60 for min

magic ermine
#

I think a function is fine