aboutsummaryrefslogtreecommitdiff
path: root/lib/getURLOfUser.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/getURLOfUser.js')
-rw-r--r--lib/getURLOfUser.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/getURLOfUser.js b/lib/getURLOfUser.js
new file mode 100644
index 0000000..2de48e6
--- /dev/null
+++ b/lib/getURLOfUser.js
@@ -0,0 +1,8 @@
+const leftPad = require('left-pad') // I imported this just to piss you off ;)
+
+function getURLOfUser (type, index, week) {
+ return `http://www.meetingpointmco.nl/Roosters-AL/doc/dagroosters/` +
+ `${leftPad(week, 2, '0')}/${type}/${type}${leftPad(index + 1, 5, '0')}.htm`
+}
+
+module.exports = getURLOfUser