MCPcopy Create free account
hub / github.com/codecombat/codecombat / currentSeason

Function currentSeason

app/core/utils.js:1374–1381  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1372]
1373
1374var currentSeason = function () {
1375 const now = new Date()
1376 const year = now.getFullYear()
1377 return seasonTimes.find(function (season) {
1378 const dates = season.end.split('-')
1379 return now < new Date(year, +dates[0] - 1, dates[1]).setHours(24, 0, 0, 0)
1380 })
1381}
1382
1383const ageToBracket = function (age) {
1384 // Convert years to an age bracket

Callers 1

yearsSinceMonthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected