# A problem with pgfcalendar and fpu

I'm trying to define a macro that will determine two dates (in weeks of 7 days), calculated from a given date (defined by \setmovedate below. For brevity the code below uses only #2 from \movetasks:

\documentclass{article}

\usepackage{tikz}
\usepackage[papersize={5.5in,8.5in}]{geometry}
\usepackage{xparse}
\usepackage{pgfcalendar}
\usetikzlibrary{fpu}

\newcounter{testit}

\makeatletter
\NewDocumentCommand{\setmovedate}{m}{%
\pgfcalendardatetojulian{#1}{\@tempcnta}
}

%% Commenting-out the \pgfkeys lines gives 'dimension too large' error
\pgfkeys{/pgf/fpu=true}
\pgfkeys{/pgf/fpu/output format=fixed}% Turn on the fp engine
\pgfcalendarjuliantodate{\fromdate}{\moveyear}{\movemonth}{\moveday} Ejects 0's from fpu\\
\moveyear-\movemonth-\moveday\ is correct
\pgfkeys{/pgf/fpu=false}
}
\makeatother

\begin{document}

\setmovedate{2019-10-15}

\end{document}


I understand the trailing 0's in \fromdate (the output from fpu) but I'm puzzled by the fact that they are discarded by \pgfcalendarjuliantodate and subsequently printed. Clearly, a simple integer is required, but my attempts to do this have, thus far, proved futile. I'm probably missing something very basic which is annoying.

Convert the result to an integer (perhaps you need to round first, to get the nearest integer):

\documentclass{article}

\usepackage{tikz}
\usepackage[papersize={5.5in,8.5in}]{geometry}
\usepackage{xparse}
\usepackage{pgfcalendar}
\usetikzlibrary{fpu}

\newcounter{testit}

\makeatletter

\NewDocumentCommand{\setmovedate}{m}{%
\pgfcalendardatetojulian{#1}{\@tempcnta}%
}

%% Commenting-out the \pgfkeys lines gives 'dimension too large' error
\pgfkeys{/pgf/fpu=true}
\pgfkeys{/pgf/fpu/output format=float}% Turn on the fp engine
\pgfmathfloattoint{\fromdate}%<---
\pgfcalendarjuliantodate{\pgfmathresult}{\moveyear}{\movemonth}{\moveday}%
\moveyear-\movemonth-\moveday\ is correct
\pgfkeys{/pgf/fpu=false}
}
\makeatother

\begin{document}

\setmovedate{2019-10-15}