Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert days to weeks and days javascript typescript

function getWeeks(days) {
  return {
    weeks : Math.floor(days / 7),
    days : days % 7
  };
}
Source by www.sitepoint.com #
 
PREVIOUS NEXT
Tagged: #convert #days #weeks #days #javascript #typescript
ADD COMMENT
Topic
Name
6+8 =