feat: display a month before negative years ; closes #92

This commit is contained in:
John McCardle 2022-01-14 14:59:12 -05:00
parent e844e27593
commit 290d8fbcfd
1 changed files with 2 additions and 1 deletions

View File

@ -592,6 +592,7 @@ export const getters = {
return state.playerAge.month < state.playerAgeMax.month
},
gameMonth: (state) => {
const gd = state.gameDate < 0 ? state.gameDate + 1440000 : state.gameDate
return {
1: 'Jan.',
2: 'Feb.',
@ -605,7 +606,7 @@ export const getters = {
10: 'Oct.',
11: 'Nov.',
12: 'Dec.',
}[(state.gameDate % 12) + 1]
}[(gd % 12) + 1]
},
gameYear: (state) => {
return Math.floor(state.gameDate / 12)