Skip to content
Browse files

fixing variable type bug with pad function

  • Loading branch information...
1 parent 1fba0d2 commit d9f724c4bfa4d7871ca7fcd4620faaeb4d542a25 Ryan Fitzgerald committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/dynode/aws-signer.js
View
6 lib/dynode/aws-signer.js
@@ -62,7 +62,7 @@ Signer._digest = function(str) {
};
Signer._requestDate = function(date) {
- return date.getUTCFullYear().toString() +
+ return date.getUTCFullYear() +
pad(date.getUTCMonth()+1) +
pad(date.getUTCDate())+'T' +
pad(date.getUTCHours()) +
@@ -79,7 +79,7 @@ function hex(str) {
}
function today(date) {
- return date.getUTCFullYear().toString() + pad(date.getUTCMonth()+1) + pad(date.getUTCDate());
+ return date.getUTCFullYear() + pad(date.getUTCMonth()+1) + pad(date.getUTCDate());
}
function hmac(key, value) {
@@ -87,7 +87,7 @@ function hmac(key, value) {
}
function pad(n) {
- return n<10 ? '0'+ n : n;
+ return n < 10 ? '0'+n : String(n);
}
var notAuthorization = function(str){return str != 'authorization';};

0 comments on commit d9f724c

Please sign in to comment.
Something went wrong with that request. Please try again.