Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const monthPercent = now => {
- const today = now.date();
- let monthTime;
- if (today == 1) {
- monthTime = convertToMinutes(now);
- } else {
- monthTime = 1440 * (today - 1) + convertToMinutes(now);
- }
- return (monthTime / (1440 * now.daysInMonth())) * 100;
- };
Add Comment
Please, Sign In to add comment