|
|
|
@ -59,7 +59,42 @@
|
|
|
|
|
* } );
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
jQuery.fn.dataTable.render.moment = function ( from, to, locale ) {
|
|
|
|
|
|
|
|
|
|
// UMD
|
|
|
|
|
(function( factory ) {
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
if ( typeof define === 'function' && define.amd ) {
|
|
|
|
|
// AMD
|
|
|
|
|
define( ['jquery'], function ( $ ) {
|
|
|
|
|
return factory( $, window, document );
|
|
|
|
|
} );
|
|
|
|
|
}
|
|
|
|
|
else if ( typeof exports === 'object' ) {
|
|
|
|
|
// CommonJS
|
|
|
|
|
module.exports = function (root, $) {
|
|
|
|
|
if ( ! root ) {
|
|
|
|
|
root = window;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( ! $ ) {
|
|
|
|
|
$ = typeof window !== 'undefined' ?
|
|
|
|
|
require('jquery') :
|
|
|
|
|
require('jquery')( root );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return factory( $, root, root.document );
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
// Browser
|
|
|
|
|
factory( jQuery, window, document );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
(function( $, window, document ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.fn.dataTable.render.moment = function ( from, to, locale ) {
|
|
|
|
|
// Argument shifting
|
|
|
|
|
if ( arguments.length === 1 ) {
|
|
|
|
|
locale = 'en';
|
|
|
|
@ -78,3 +113,6 @@ jQuery.fn.dataTable.render.moment = function ( from, to, locale ) {
|
|
|
|
|
return m.format( type === 'sort' || type === 'type' ? 'x' : to );
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}));
|
|
|
|
|