Guest User

Untitled

a guest
Jan 23rd, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. const monthPercent = now => {
  2. const today = now.date();
  3. let monthTime;
  4. if (today == 1) {
  5. monthTime = convertToMinutes(now);
  6. } else {
  7. monthTime = 1440 * (today - 1) + convertToMinutes(now);
  8. }
  9.  
  10. return (monthTime / (1440 * now.daysInMonth())) * 100;
  11. };
Add Comment
Please, Sign In to add comment