Skip to content

Commit

Permalink
Fix misleading comment and change errant getFullYear to getUTCFullYear.
Browse files Browse the repository at this point in the history
  • Loading branch information
RickyRomero authored and jannic committed Apr 3, 2010
1 parent 2a55441 commit 7b814a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/date.js
Expand Up @@ -568,7 +568,7 @@ timezoneJS.timezone = new function() {
if ( Number( ruleset[ i ][ 0 ] ) <= year ) // Exclude future rules.
{
if (
Number( ruleset[ i ][ 1 ] ) >= year // Date is in a set range. Shouldn't see them equal, but just in case.
Number( ruleset[ i ][ 1 ] ) >= year // Date is in a set range.
|| ( Number( ruleset[ i ][ 0 ] ) === year && ruleset[ i ][ 1 ] === "only" ) // Date is in an "only" year.
|| ruleset[ i ][ 1 ] === "max" // We're in a range from the start year to infinity.
)
Expand Down Expand Up @@ -603,7 +603,7 @@ timezoneJS.timezone = new function() {
return a - b;
}

var year = date.getFullYear( );
var year = date.getUTCFullYear( );
var applicableRules;

applicableRules = findApplicableRules( year, _this.rules[ ruleset ] );
Expand Down

0 comments on commit 7b814a9

Please sign in to comment.