1. Список говнокодов пользователя dimasokol

    Всего: 1

  2. JavaScript / Говнокод #6470

    +174

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    var RemainsFullDays=(parseInt(RemainsSec/(24*60*60)));
    var days=" дней "
    if (
                RemainsFullDays==2 ||
                RemainsFullDays==3 ||
                RemainsFullDays==4 ||
                RemainsFullDays==22 ||
                RemainsFullDays==23 ||
                RemainsFullDays==24 ||
                RemainsFullDays==42 ||
                RemainsFullDays==43 ||
                RemainsFullDays==44 ||
                RemainsFullDays==52 ||
                RemainsFullDays==53 ||
                RemainsFullDays==54 ||
                RemainsFullDays==62 ||
                RemainsFullDays==63 ||
                RemainsFullDays==64 ||
                RemainsFullDays==72 ||
                RemainsFullDays==73 ||
                RemainsFullDays==74 ||
                RemainsFullDays==82 ||
                RemainsFullDays==83 ||
                RemainsFullDays==84 ||
                RemainsFullDays==92 ||
                RemainsFullDays==93 ||
                RemainsFullDays==94 ||
                RemainsFullDays==102 ||
                RemainsFullDays==103 ||
                RemainsFullDays==104 ||
                RemainsFullDays==122 ||
                RemainsFullDays==123 ||
                RemainsFullDays==124 ||
                RemainsFullDays==132 ||
                RemainsFullDays==133 ||
                RemainsFullDays==134 ||
                RemainsFullDays==32 ||
                RemainsFullDays==33 ||
                RemainsFullDays==34
                ) {
                days=" дня "
    }
    
    if (
                RemainsFullDays==1 ||
                RemainsFullDays==21 ||
                RemainsFullDays==41 ||
                RemainsFullDays==51 ||
                RemainsFullDays==61 ||
                RemainsFullDays==71 ||
                RemainsFullDays==81 ||
                RemainsFullDays==91 ||
                RemainsFullDays==121 ||
                RemainsFullDays==131 ||
                RemainsFullDays==141 ||
                RemainsFullDays==151 ||
                RemainsFullDays==31 
                ) {
                days=" день "
    }

    Найдено на препарируемом клиентском сайте рядом со счётчиком. Бессмертная вариация на тему классики!

    Особо замечательно что про 31 день явно вспомнили в последний момент.

    dimasokol, 25 Апреля 2011

    Комментарии (20)