|
|
|
@ -12,7 +12,7 @@ const MONTH_ABBR = [
|
|
|
|
function buildYearSegments() {
|
|
|
|
function buildYearSegments() {
|
|
|
|
const segments: { year: number; span: number; startMonthIndex: number }[] = []
|
|
|
|
const segments: { year: number; span: number; startMonthIndex: number }[] = []
|
|
|
|
let monthOfYear = timeline.startMonthOfYear // 8 = agosto
|
|
|
|
let monthOfYear = timeline.startMonthOfYear // 8 = agosto
|
|
|
|
let year = timeline.startYear
|
|
|
|
let year = Number(timeline.startYear)
|
|
|
|
let current = { year, span: 0, startMonthIndex: 1 }
|
|
|
|
let current = { year, span: 0, startMonthIndex: 1 }
|
|
|
|
for (let m = 1; m <= timeline.totalMonths; m++) {
|
|
|
|
for (let m = 1; m <= timeline.totalMonths; m++) {
|
|
|
|
if (current.span === 0) current.startMonthIndex = m
|
|
|
|
if (current.span === 0) current.startMonthIndex = m
|
|
|
|
|