首页 > 其他 > 详细

ABP中table时间格式化

时间:2020-06-22 17:34:10      阅读:60      评论:0      收藏:0      [点我收藏+]

 

 {
                targets: 6,
                data: ‘graduationTime‘,
                sortable: false,
                render: function (graduationTime) {
                    return moment(graduationTime).format(‘L‘);
                }
            },


  {
                targets: 8,
                data: ‘birthday‘,
                sortable: false,
                render: function (birthday) {
                    return moment(birthday).format(‘YYYY-MM-DD‘);
                }
            }

moment.js

    var defaultCalendar = {
        sameDay : ‘[Today at] LT‘,
        nextDay : ‘[Tomorrow at] LT‘,
        nextWeek : ‘dddd [at] LT‘,
        lastDay : ‘[Yesterday at] LT‘,
        lastWeek : ‘[Last] dddd [at] LT‘,
        sameElse : ‘L‘
    };

    function calendar (key, mom, now) {
        var output = this._calendar[key] || this._calendar[‘sameElse‘];
        return isFunction(output) ? output.call(mom, now) : output;
    }

    var defaultLongDateFormat = {
        LTS  : ‘h:mm:ss A‘,
        LT   : ‘h:mm A‘,
        L    : ‘MM/DD/YYYY‘,
        LL   : ‘MMMM D, YYYY‘,
        LLL  : ‘MMMM D, YYYY h:mm A‘,
        LLLL : ‘dddd, MMMM D, YYYY h:mm A‘
    };

 

ABP中table时间格式化

原文:https://www.cnblogs.com/wangyinlon/p/13177515.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!