FUCKING BIG UPDATE: server, parallax, apis, new data models, style, layout, other

This commit is contained in:
tmshv committed 2016-03-03 01:34:45 +03:00
1 parent e0f54171a9
commit 359cc430f5
78 files changed
+1063 -445

No files matched your search

+20 -1
View File
@@ -1,5 +1,24 @@
let tryReplace = (dict, record, map = i=>i) =>
record in dict ? map(dict[record]) : record;
export const autumnMonth = 8;
export const springMonth = 0;
export const populate = (dict, map) =>
id => tryReplace(dict, id, map);
id => tryReplace(dict, id, map);
export function scheduleDate(schedule){
let {period, semester} = schedule;
let i = semester === 'spring' ? 1 : 0;
let year = parseInt(
period.split('-')[i]
);
return new Date(
year,
i ? springMonth : autumnMonth ,
1
);
}