Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

get an day array when have a startDay and FinishDay js

 function getDates(beginDate: Date, endDate: Date) {
    var dateArray = new Array()
    var currentDate = beginDate
    while (currentDate <= endDate) {
      dateArray.push(currentDate)
      currentDate = addDays(1, currentDate)
    }
    return dateArray
  }

  function addDays(days: number, currentDate: Date) {
    var dat = new Date(currentDate)
    dat.setDate(dat.getDate() + days)
    return dat
  }
Comment

PREVIOUS NEXT
Code Example
Javascript :: declaring variable react hooks 
Javascript :: url 
Javascript :: errorMessage is not defined 
Javascript :: public JsonResult what is the return 
Javascript :: javascript json error html 
Javascript :: read more/less button with smoth expand 
Javascript :: sum in javascript 
Javascript :: #{10000000000000000000000000000000000} js 
Python :: All caps alphabet as list 
Python :: python suppress warnings 
Python :: shebang for python linux 
Python :: suppress pandas future warnings 
Python :: plt figsize 
Python :: simple flask hello world 
Python :: merge on index pandas 
Python :: python open web browser 
Python :: python spawn shell 
Python :: jupyter notebook print all rows dataframe 
Python :: how to rezize image in python tkinter 
Python :: download pip install 
Python :: How to play music without pygame 
Python :: python urlencode 
Python :: validation split python 
Python :: how to import pygame onto python 
Python :: remove axis in a python plot 
Python :: get mouse click coordinates python turtle 
Python :: pandas dropna specific column 
Python :: pickle a dictionary 
Python :: get list of unique values in pandas column 
Python :: python os make empty file 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =