Fix delay calcs when times are from two different days (i.e. 23:59-00:00)
| | |
| | | } |
| | | |
| | | function parseTime(date, time) { |
| | | var result = new Date(date.getFullYear(), date.getMonth(), date.getDay()); |
| | | var result = new Date(date.getTime()); |
| | | var time_split = time.split(':'); |
| | | result.setHours(time_split[0]); |
| | | result.setMinutes(time_split[1]); |
| | | result.setHours(time_split[0], time_split[1], 0); |
| | | |
| | | if(result.getTime() - date.getTime() > 72000000) { |
| | | result.setTime(result.getTime() - 86400000); |
| | |
| | | </div> |
| | | <script src="https://polyfill.io/v3/polyfill.min.js?features=Promise,XMLHttpRequest"></script> |
| | | <script type="text/javascript" src="lang_pl.js?v9" id="lang_script"></script> |
| | | <script type="text/javascript" src="common.js?v9"></script> |
| | | <script type="text/javascript" src="common.js?v10"></script> |
| | | <script type="text/javascript" src="index.js?v8"></script> |
| | | </body> |
| | | </html> |
| | |
| | | <script src="https://polyfill.io/v3/polyfill.min.js?features=Array.prototype.forEach,Array.prototype.includes,Array.prototype.map,Element.prototype.classList,Promise,String.prototype.startsWith,XMLHttpRequest,requestAnimationFrame"></script> |
| | | <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v5.3.0/build/ol.js" integrity="sha384-iQkGyyH4ioz3m+maM3s9MX1Oq67mACa4B9Z3ovUv3Sv37LJ96fx3WnZfLoiC3Wfl" crossorigin="anonymous"></script> |
| | | <script tyle="text/javascript" src="lang_pl.js?v9" id="lang_script"></script> |
| | | <script tyle="text/javascript" src="common.js?v9"></script> |
| | | <script tyle="text/javascript" src="common.js?v10"></script> |
| | | <script tyle="text/javascript" src="map.js?v22"></script> |
| | | </body> |
| | | </html> |