re: Daily Challenge #21 - Human Readable Time VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Javascript, but with functional stuff const quotientFunctions = { year: time => Math.floor(time / (365 * 24 * 60 * 60)), day: time => ...
 

Ya this answer ruined me 😆
Once I read it's the only way to 'cleanly' solve it I could think of!

I opted to force myself to go with a different iterativ-ish solution but this one gets my vote here!

 

You could think about the comma/and issue that I was too lazy to make

And thanks for the kind words :)

You could think about the comma/and issue that I was too lazy to make

Ahh ya I didn't notice that on my first quick read through. I did get the commas right, I believe, so I got that going for me!

The part of this that I really like is just defining the conversion functions, it reads much better than the solution that I came up with in terms of how the conversions all work!

code of conduct - report abuse