mirror of
https://github.com/musix-org/musix-oss
synced 2025-06-17 04:26:00 +00:00
Modules
This commit is contained in:
42
node_modules/date-and-time/plugin/meridiem.js
generated
vendored
Normal file
42
node_modules/date-and-time/plugin/meridiem.js
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.plugin('meridiem', {
|
||||
res: {
|
||||
A: ['AM', 'PM', 'A.M.', 'P.M.', 'am', 'pm', 'a.m.', 'p.m.']
|
||||
},
|
||||
formatter: {
|
||||
AA: function (d) {
|
||||
// A.M. / P.M.
|
||||
return this.res.A[d.getHours() > 11 | 0 + 2];
|
||||
},
|
||||
a: function (d) {
|
||||
// am / pm
|
||||
return this.res.A[d.getHours() > 11 | 0 + 4];
|
||||
},
|
||||
aa: function (d) {
|
||||
// a.m. / p.m.
|
||||
return this.res.A[d.getHours() > 11 | 0 + 6];
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
A: function (str) {
|
||||
var result = this.find(this.res.A, str);
|
||||
result.value %= 2;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
38
node_modules/date-and-time/plugin/ordinal.js
generated
vendored
Normal file
38
node_modules/date-and-time/plugin/ordinal.js
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.plugin('ordinal', {
|
||||
formatter: {
|
||||
DDD: function (d) {
|
||||
var day = d.getDate();
|
||||
|
||||
switch (day) {
|
||||
case 1:
|
||||
case 21:
|
||||
case 31:
|
||||
return day + 'st';
|
||||
case 2:
|
||||
case 22:
|
||||
return day + 'nd';
|
||||
case 3:
|
||||
case 23:
|
||||
return day + 'rd';
|
||||
default:
|
||||
return day + 'th';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
30
node_modules/date-and-time/plugin/two-digit-year.js
generated
vendored
Normal file
30
node_modules/date-and-time/plugin/two-digit-year.js
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.plugin('two-digit-year', {
|
||||
parser: {
|
||||
YY: function (str) {
|
||||
var result = this.exec(/^\d\d/, str);
|
||||
result.value += result.value < 70 ? 2000 : 1900;
|
||||
return result;
|
||||
},
|
||||
Y: function (str) {
|
||||
var result = this.exec(/^\d\d?/, str);
|
||||
result.value += result.value < 70 ? 2000 : 1900;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
Reference in New Issue
Block a user