19
vane
6y

Everyone is on their vacation and I am in good mood so time to refactor some 3 year old frontend, angular, javascript code. After 5 minutes of looking, some great quality of code snippet on the image below.

Comments
  • 5
    So... it reverses to reverse it back later?
  • 3
    @lucaspar I also don't understand it, and I don't want to. Usually I remove things that I don't want to understand to see results.

    After removing this method nothing happened yet.
  • 4
    Some more treasure.
  • 2
    Crimes against humanity
  • 2
  • 3
    Some funny condition
  • 3
    Some funny server time counter. Forgot to mention that I am backend developer of this project and doing ui only when frontend developer is changing or is on vacation. Well I now know why they're changing lol.
  • 2
    Some fancy date manipulation.
  • 1
    Before I say anything, I'll say this: dates in Js... .... feelsbadman - my solution is to send to frontend as a string hehehe (when I can get away with it)

    Now for my comment: imagine all the time messing around with the debugger you just deleted :D

    I must say, that's a good way to find what uses the confusing specimen
  • 1
    @mrrmc for those struggling with date / time in JS, please use this: momentjs.com
Add Comment