admin管理员组

文章数量:1538113

1、 2020-01-08T16:32:32.000000Z 转 北京时间  yy-mm-dd

2020-01-08T16:32:32.000000Z为UTC通用格式

format(time, format) {
                var t = new Date(time);
                var tf = function (i) { return (i < 10 ? '0' : '') + i };
                return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function (a) {
                    switch (a) {
                        case 'yyyy':
                            return tf(t.getFullYear());
                            break;
                        case 'MM':
                            return tf(t.getMonth() + 1);
                            break;
                        case 'mm':
                            return tf(t.getMinutes());
                            break;
                        case 'dd':
                            return tf(t.getDate());
                            break;
                        case 'HH':
                  

本文标签: 格式转换时间