# How to create user defined time table

I have to create a three years work plane, but it still only shows me 4 months,

How do I need to do?

        \documentclass{article}
\usepackage{etoolbox}
\usepackage{parskip}
\usepackage{tikz}
\usepackage{pgfgantt}
\usepackage{ifthen}
\newcounter{myWeekNum}
\stepcounter{myWeekNum}

\begin{document}
\newcommand{\myWeek}{\themyWeekNum
\stepcounter{myWeekNum}
\ifnum\themyWeekNum=53
\setcounter{myWeekNum}{2}
\else\fi
}
%
%%% Begin document

\setcounter{myWeekNum}{1}
\ganttset{%
calendar week text={\myWeek{}}%
}
%
\begin{figure}[h!bt]
\begin{center}
\begin{ganttchart}[
vgrid={*{6}{draw=none}, dotted},
x unit=.08cm,
y unit title=.6cm,
y unit chart=.6cm,
time slot format=isodate,
time slot format/start date=2019-6-01]{2021-12-01}{2022-04-30}
\ganttset{bar height=1.6}
\gantttitlecalendar{year, month=name} \\
\end{ganttchart}
\end{center}
\caption{Time Plan}
\end{figure}
\end{document}

• I think you have to change dates here {2021-12-01}{2022-04-30}. – Sigur Nov 16 '18 at 22:55
• Use start date=2019-1-01 and {2019-1-01}{2022-12-31} for years 2019-2022. – Sigur Nov 16 '18 at 22:58

Here is a possible solution. It is not clear to me what you want.

Since 3 years has 36 months, the width image is tooooo long. So a standalone will produce a wider pdf.

Here is only a piece from pdf viewer.

\documentclass{standalone}
\usepackage{pgfgantt}
\usepackage{ifthen}
\newcounter{myWeekNum}
\stepcounter{myWeekNum}

\newcommand{\myWeek}{\themyWeekNum
\stepcounter{myWeekNum}
\ifnum\themyWeekNum=53
\setcounter{myWeekNum}{2}
\else\fi
}
\setcounter{myWeekNum}{1}
\ganttset{%
calendar week text={\myWeek{}}%
}

\begin{document}

\begin{ganttchart}[
vgrid={*{6}{draw=none}, dotted},
x unit=.08cm,
y unit title=.6cm,
y unit chart=.6cm,
time slot format=isodate,
time slot format/start date=2019-1-01]{2019-1-01}{2022-12-31}
\ganttset{bar height=.6}
\gantttitlecalendar{year, month=name} \\