javascript - How get range of current week date like this format (March 20.2017)? -
- march 20.2017 (monday)
- march 21.2017 (tuesday)
- march 22.2017 (wednesday)
- march 23.2017 (thursday)
- ....
use date.js library. such things should yourself
the cdn path of library: https://cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js
var date= date.monday().tostring('mmmm dd.yyyy') date += "\n"+date.tuesday().tostring('mmmm dd.yyyy') date += "\n"+date.wednesday().tostring('mmmm dd.yyyy') date += "\n"+date.thursday().tostring('mmmm dd.yyyy') date += "\n"+date.friday().tostring('mmmm dd.yyyy') date += "\n"+date.saturday().tostring('mmmm dd.yyyy') console.log(date)
<script src="https://cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js"></script>
Comments
Post a Comment