Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!Date.prototype.toLocalISOString) {
- (function() {
- function pad(number) {
- if (number < 10) {
- return '0' + number;
- }
- return number;
- }
- Date.prototype.toLocalISOString = function() {
- return this.getFullYear() +
- '-' + pad(this.getMonth() + 1) +
- '-' + pad(this.getDate()) +
- 'T' + pad(this.getHours()) +
- ':' + pad(this.getMinutes()) +
- ':' + pad(this.getSeconds()) +
- '.' + (this.getMilliseconds() / 1000).toFixed(3).slice(2, 5) +
- 'Z';
- };
- }());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement