code: function imgName() {
      var date = new Date(),
          pad = function (n) { return n < 10 ? '0' + n : n; };
      return 'IMG_' + date.getFullYear() + pad(date.getMonth() + 1) + pad(date.getDate()) + '_' +
              pad(date.getHours()) + pad(date.getMinutes()) + pad(date.getSeconds()) + '.png';
  }
docs: create unique name for saved file (same pattern as BB10 camera app)