- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 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 день явно вспомнили в последний момент.