Permalink
Browse files

Remove dead code

  • Loading branch information...
1 parent c7144e6 commit 07ed86fb5b1fc08e0015d727213f2e1e970eac6c @eeroan eeroan committed Jun 4, 2012
Showing with 0 additions and 29 deletions.
  1. +0 −29 src/main/DateTime.js
View
29 src/main/DateTime.js
@@ -102,12 +102,6 @@ DateTime.prototype.plusDays = function(days) {
return newDateTime
}
-DateTime.prototype.plusYears = function(years) {
- var newDateTime = this.clone()
- newDateTime.setFullYear(this.getFullYear() + years)
- return newDateTime()
-}
-
DateTime.prototype.stripped = function() { return new Date(parseInt(this.getTime() / DateTime.DAY, 10)) }
DateTime.prototype.compareTo = function(date) {
@@ -127,13 +121,6 @@ DateTime.prototype.compareTo = function(date) {
}
}
-DateTime.prototype.compareDateOnlyTo = function(DateTime) {
- if(!DateTime) {
- return 1
- }
- return this.stripped().compareTo(DateTime.stripped())
-}
-
DateTime.prototype.isToday = function() { return this.equalsOnlyDate(DateTime.now()) }
DateTime.prototype.getWeekInYear = function(weekNumberingSystem) {
@@ -173,12 +160,6 @@ DateTime.prototype.getWeekInYear = function(weekNumberingSystem) {
return week
}
-DateTime.prototype.hasMonthChangedOnPreviousWeek = function(firstDayOfWeek) {
- var thisFirst = this.getFirstDateTimeOfWeek(firstDayOfWeek)
- var lastFirst = thisFirst.plusDays(-7)
- return thisFirst.getMonth() != lastFirst.getMonth()
-}
-
//TODO refactor
DateTime.prototype.clone = function() { return new DateTime(new Date(this.getTime())) }
@@ -241,16 +222,6 @@ DateTime.prototype.isLeapYear = function() {
return ((year & 3) == 0 && (year % 100 || (year % 400 == 0 && year)))
}
-DateTime.prototype.getFirstDayOfMonth = function() {
- var day = (this.getDay() - (this.getDate() - 1)) % 7
- return (day < 0) ? (day + 7) : day
-}
-
-DateTime.prototype.getLastDayOfMonth = function() {
- var day = (this.getDay() + (DateTime.daysInMonth[this.getMonth()] - this.getDate())) % 7
- return (day < 0) ? (day + 7) : day
-}
-
DateTime.prototype.getDaysInMonth = function() {
DateTime.daysInMonth[1] = this.isLeapYear() ? 29 : 28
return DateTime.daysInMonth[this.getMonth()]

0 comments on commit 07ed86f

Please sign in to comment.