Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getValueProgress(fraction, hours) {
  2.             if (fraction == 'ru') {
  3.                 if (+hours < 6)
  4.                     return 99;
  5.                 if (+hours < 8)
  6.                     return 85;
  7.                 if (+hours < 10)
  8.                     return 70;
  9.                 if (+hours < 12)
  10.                     return 60;
  11.                 if (+hours < 14)
  12.                     return 50;
  13.                 if (+hours < 16)
  14.                     return 40;
  15.                 if (+hours < 18)
  16.                     return 30;
  17.                 if (+hours < 20)
  18.                     return 20;
  19.                 if (+hours < 22)
  20.                     return 10;
  21.             } else if (fraction == 'de') {
  22.                 if (+hours < 4)
  23.                     return 98;
  24.                 if (+hours < 6)
  25.                     return 80;
  26.                 if (+hours < 8)
  27.                     return 66;
  28.                 if (+hours < 10)
  29.                     return 55;
  30.                 if (+hours < 12)
  31.                     return 43;
  32.                 if (+hours < 14)
  33.                     return 34;
  34.                 if (+hours < 16)
  35.                     return 25;
  36.                 if (+hours < 18)
  37.                     return 21;
  38.                 if (+hours < 20)
  39.                     return 15;
  40.                 if (+hours < 22)
  41.                     return 4;
  42.             } else if (fraction == 'pl') {
  43.                 if (+hours < 5)
  44.                     return 99;
  45.                 if (+hours < 6)
  46.                     return 80;
  47.                 if (+hours < 8)
  48.                     return 78;
  49.                 if (+hours < 10)
  50.                     return 64;
  51.                 if (+hours < 12)
  52.                     return 58;
  53.                 if (+hours < 14)
  54.                     return 42;
  55.                 if (+hours < 16)
  56.                     return 37;
  57.                 if (+hours < 18)
  58.                     return 31;
  59.                 if (+hours < 20)
  60.                     return 19;
  61.                 if (+hours < 22)
  62.                     return 7;
  63.             } else if (fraction == 'en') {
  64.                 if (+hours < 3)
  65.                     return 99;
  66.                 if (+hours < 6)
  67.                     return 80;
  68.                 if (+hours < 8)
  69.                     return 70;
  70.                 if (+hours < 10)
  71.                     return 62;
  72.                 if (+hours < 12)
  73.                     return 59;
  74.                 if (+hours < 14)
  75.                     return 48;
  76.                 if (+hours < 16)
  77.                     return 32;
  78.                 if (+hours < 18)
  79.                     return 15;
  80.                 if (+hours < 20)
  81.                     return 7;
  82.                 if (+hours < 22)
  83.                     return 2;
  84.             }
  85.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement