Skip to content

Commit

Permalink
Removed unused Date.prototype.getHourMinute().
Browse files Browse the repository at this point in the history
Unused since d2180a6.
  • Loading branch information
ngnpope authored and timgraham committed Mar 27, 2019
1 parent 8c69431 commit a25029b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
4 changes: 0 additions & 4 deletions django/contrib/admin/static/admin/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ function findPosY(obj) {
return (this.getSeconds() < 10) ? '0' + this.getSeconds() : this.getSeconds();
};

Date.prototype.getHourMinute = function() {
return this.getTwoDigitHour() + ':' + this.getTwoDigitMinute();
};

Date.prototype.getFullMonthName = function() {
return typeof window.CalendarNamespace === "undefined"
? this.getTwoDigitMonth()
Expand Down
5 changes: 0 additions & 5 deletions js_tests/admin/core.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ QUnit.test('Date.getTwoDigitSecond', function(assert) {
assert.equal(new Date(2014, 6, 1, 0, 0, 20).getTwoDigitSecond(), '20', '12:00:20 am is 20');
});

QUnit.test('Date.getHourMinute', function(assert) {
assert.equal(new Date(2014, 6, 1, 11, 0).getHourMinute(), '11:00', '11:00 am is 11:00');
assert.equal(new Date(2014, 6, 1, 13, 25).getHourMinute(), '13:25', '1:25 pm is 13:25');
});

QUnit.test('Date.strftime', function(assert) {
var date = new Date(2014, 6, 1, 11, 0, 5);
assert.equal(date.strftime('%Y-%m-%d %H:%M:%S'), '2014-07-01 11:00:05');
Expand Down

0 comments on commit a25029b

Please sign in to comment.