636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
|
const tzOffsetToString = function(off){
const hours = Math.round(off/60), min = Math.round(off % 30);
return ''+(hours + (min ? '.5' : ''));
};
const pad2 = (x)=>('0'+x).substr(-2);
const localTime8601 = function(d){
return [
d.getYear()+1900, '-', pad2(d.getMonth()+1), '-', pad2(d.getDate()+1),
'T', pad2(d.getHours()),':', pad2(d.getMinutes()),':',pad2(d.getSeconds())
].join('');
};
Chat.submitMessage = function(){
const fd = new FormData(this.e.inputForm)
/* ^^^^ we don't really want/need the FORM element, but when
|
|
|
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
|
const tzOffsetToString = function(off){
const hours = Math.round(off/60), min = Math.round(off % 30);
return ''+(hours + (min ? '.5' : ''));
};
const pad2 = (x)=>('0'+x).substr(-2);
const localTime8601 = function(d){
return [
d.getYear()+1900, '-', pad2(d.getMonth()+1), '-', pad2(d.getDate()),
'T', pad2(d.getHours()),':', pad2(d.getMinutes()),':',pad2(d.getSeconds())
].join('');
};
Chat.submitMessage = function(){
const fd = new FormData(this.e.inputForm)
/* ^^^^ we don't really want/need the FORM element, but when
|