1


            loadTimeString(ts) {
                var d = new Date();
                if (String(ts).length == 10) {
                    d = new Date(ts * 1000);
                }
                else if (String(ts).length == 13) {
                    d = new Date(ts);
                }
                var yyyy = d.getFullYear();
                var mm = d.getMonth() + 1;
                var dd = d.getDate();
                return yyyy
                    + '-' + (mm > 10 ? mm : '0' + mm)
                    + '-' + (dd > 10 ? dd : '0' + dd)
            },

2


            formDate(date) {
                var y = date.getFullYear();
                var m = date.getMonth() + 1;
                m = m < 10 ? '0' + m : m;
                var d = date.getDate();
                d = d < 10 ? ('0' + d) : d;
                return y + '-' + m + '-' + d;
            },
09-17 01:55