This repository has been archived on 2025-02-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
carnetdejeu-crystal/src/assets/javascripts/main.js

24 lines
501 B
JavaScript
Raw Normal View History

2018-09-03 23:08:32 +02:00
import Amber from 'amber'
if (!Date.prototype.toGranite) {
(function() {
function pad(number) {
if (number < 10) {
return '0' + number;
}
return number;
}
Date.prototype.toGranite = function() {
return this.getUTCFullYear() +
'-' + pad(this.getUTCMonth() + 1) +
'-' + pad(this.getUTCDate()) +
' ' + pad(this.getUTCHours()) +
':' + pad(this.getUTCMinutes()) +
':' + pad(this.getUTCSeconds()) ;
};
}());
}