skip to Main Content

how to get sundays in given period – Javascript

<script> var startDate = "2023/04/01"; var endDate = "2023/04/16"; var dateMove = new Date(startDate); var strDate = startDate; while (strDate < endDate){ var strDate = dateMove.toISOString().slice(0,10); array.push(strDate); dateMove.setDate(dateMove.getDate()+1); }; $('.show').html(array); </script> result"2023/04/01","2023/04/01","2023/04/02","2023/04/03","2023/04/04","2023/04/05","2023/04/06","2023/04/07","2023/04/08","2023/04/09","2023/04/10","2023/04/11","2023/04/12","2023/04/13","2023/04/14","2023/04/15","2023/04/16" how to get results on Sundays 2023/04/02,2023/04/09,2023/04/16

VIEW QUESTION

How to change color of Container on basis of array data in flutter?

IOWebSocketChannel? ioChannel; List<CustomRunners>? oldData = []; List<CustomRunners>? newData = []; void getSocket(){ ioChannel = IOWebSocketChannel.connect( Uri.parse( 'wss://xxx.xyz/port=${widget.port}/?logged=true&source=0'), headers: { 'Origin': 'https://abc.io', }, ); ioChannel?.stream.listen((message) { final data = jsonDecode(message); if (data[0] != null) { final match = SocketModel.fromJson(data[0]); newData!.clear(); for…

VIEW QUESTION
Back To Top
Search