feklee / rotogamesq

ROTOGAMEsq — https://sq.rotogame.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tie boards to date ranges (periods)

feklee opened this issue · comments

Date ranges specify during which periods, boards are displayed.

Time zone: local time zone of server

Example:

{
    name: 'winter',
    sideLenT: 7,
    startPosT: [0, 65],
    endPosT: [7, 65],
    firstMonth: 11,
    firstDay: 15,
    lastMonth: 02,
    lastDay: 15
}

Or, with year:

{
    name: '14',
    sideLenT: 7,
    startPosT: [0, 65],
    endPosT: [7, 65],
    firstYear: 2014
    firstMonth: 01,
    firstDay: 01,
    lastMonth: 02,
    lastDay: 15
}

Rules for calculating year, if not specified:

  • firstYear not specified: firstYear = current year
  • lastYear not specified:
    • lastMonth > firstMonth: lastYear = firstYear
    • lastMonthfirstMonth: lastYear = firstYear + 1

Associate hiscores names with date ranges as well, for example:

winter-20131115-20140215

That way they get reset for each period, but still are preserved in the database.