1//DateTime 2function DatePicker(obj, options = null) { 3 let air = new AirDatepicker(obj, options); 4 return air; 5} 6function DatePickerMonth(obj, onchange = null) { 7 let startDate = new Date(); 8 if ($(obj).attr('data-fecha') != undefined && $(obj).attr('data-fecha') != null && $(obj).attr('data-fecha') != null) { 9 startDate = new Date($(obj).attr('data-fecha')); 10 } 11 let air; 12 if (onchange == null) { 13 air = new AirDatepicker(obj, { 14 view: 'months', 15 minView: 'months', 16 dateFormat: 'MMMM yyyy', 17 startDate, 18 selectedDates: [startDate] 19 }); 20 } else { 21 air = new AirDatepicker(obj, { 22 view: 'months', 23 minView: 'months', 24 dateFormat: 'MMMM yyyy', 25 startDate, 26 selectedDates: [startDate], 27 onSelect: onchange 28 }); 29 } 30 return air; 31} 32function DatePickerYear(obj) { 33 let air = new AirDatepicker(obj, { 34 view: 'years', 35 minView: 'years', 36 dateFormat: 'yyyy' 37 }); 38 return air; 39} 40function DatePickerRange(obj, onchange = null) { 41 let air; 42 if (onchange == null) { 43 air = new AirDatepicker(obj, { 44 range: true, 45 multipleDatesSeparator: ' - ' 46 }); 47 } else { 48 air = new AirDatepicker(obj, { 49 range: true, 50 multipleDatesSeparator: ' - ', 51 onSelect: onchange 52 }); 53 } 54 return air; 55} 56 57function DateFormat(date) { 58 try { 59 let d = date; 60 let month = (d.getMonth() + 1).toString().padStart(2, '0'); 61 let day = d.getDate().toString().padStart(2, '0'); 62 let year = d.getFullYear(); 63 return [year, month, day].join('-'); 64 } catch (err) { 65 return ''; 66 } 67} 68 69function DateFormatWithTime(date) { 70 try { 71 let d = date; 72 let month = (d.getMonth() + 1).toString().padStart(2, '0'); 73 let day = d.getDate().toString().padStart(2, '0'); 74 let year = d.getFullYear(); 75 let dateDate = [year, month, day].join('-'); 76 let hours = d.getHours(); 77 let minutes = d.getMinutes(); 78 let dateTime = [hours, minutes, "00"].join(':'); 79 return dateDate + " " + dateTime; 80 } catch (err) { 81 return ''; 82 } 83} 84 85function DateFormatView(date) { 86 try { 87 let d = date; 88 let month = (d.getMonth() + 1).toString().padStart(2, '0'); 89 let day = d.getDate().toString().padStart(2, '0'); 90 let year = d.getFullYear(); 91 return [day, month, year].join('/'); 92 } catch (err) { 93 return ''; 94 } 95} 96 97 98function YearNow() { 99 let d = new Date; 100 return d.getFullYear(); 101} 102function MonthNow() { 103 let d = new Date; 104 return (d.getMonth() + 1).toString().padStart(2, '0'); 105} 106function DayNow() { 107 let d = new Date; 108 return d.getDate().toString().padStart(2, '0'); 109} 110function DateNow() { 111 try { 112 let d = new Date; 113 let month = (d.getMonth() + 1).toString().padStart(2, '0'); 114 let day = d.getDate().toString().padStart(2, '0'); 115 let year = d.getFullYear(); 116 return [day, month, year].join('/'); 117 } catch (err) { 118 return ''; 119 } 120}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.