diff --git a/partials/tabs/mentors.html b/partials/tabs/mentors.html
index 28b87b02..233fc4a3 100644
--- a/partials/tabs/mentors.html
+++ b/partials/tabs/mentors.html
@@ -4,7 +4,7 @@
Hello there!
- We are the mentors for coala in GSoC 2018.
+ We are the mentors for coala in GSoC {{ getGsocYear() }}.
Just drop a message on Gitter -
@@ -42,7 +42,7 @@
Admins
- We are the admins for coala in GSoC 2018.
+ We are the admins for coala in GSoC {{ getGsocYear() }}.
Just drop a message on Gitter
diff --git a/resources/js/app.js b/resources/js/app.js
index af811167..79677778 100644
--- a/resources/js/app.js
+++ b/resources/js/app.js
@@ -1,3 +1,5 @@
+---
+---
(function(){
var app = angular.module('coala', ['ngSanitize','btford.markdown', 'ngRoute']);
@@ -386,6 +388,16 @@
self.mentorsList = {}
self.adminsList = {}
+ $scope.getGsocYear = function() {
+ var gsocSwitchMonth = {{ site.gsoc_switch_month }}
+ var currentDate = new Date()
+ if (currentDate.getMonth() >= gsocSwitchMonth) {
+ return currentDate.getFullYear() + 1
+ } else {
+ return currentDate.getFullYear()
+ }
+ }
+
$http.get('data/projects.liquid')
.then(function (res) {
$scope.projects = res.data.filter(project => project.status != "completed")