aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/getURLOfUser.js
blob: 1d27175eeae9657be866f06a8a2c51084edd2e7c (plain)
1
2
3
4
5
6
7
8
9
var leftPad = require('left-pad')
var getWeek = require('./getWeek')

function getURLOfUsers (weekOffset, type, id) {
  return `//${window.location.host}/meetingpointProxy/Roosters-AL%2Fdoc%2Fdagroosters%2F` +
      `${(getWeek() + weekOffset)}%2F${type}%2F${type}${leftPad(id, 5, '0')}.htm`
}

module.exports = getURLOfUsers