\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#444: Add "weekdays" unit in clock add}
\date{February 23, 2016}
\author{Pietro Cerutti}
\urlstyle{sf}
\setlength{\parskip}{1ex}
\setlength{\parindent}{0pt}
\def\tipversion$#1${\texttt{\$#1\$}}
\def\tiplangle#1{\ensuremath{<}}
\def\tiprangle#1{\ensuremath{>}}
\def\tipbar#1{\ensuremath{|}}
\def\tipmail#1#2{\(\langle\){\small\expandafter\url{#1@#2}}\(\rangle\)}
\ifx\pdfoutput\undefined
\newcommand{\tipimage}[2]{\typeout{Make sure you download #1.eps}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.eps}}{\includegraphics[width=0.8\textwidth]{#1.eps}}}
\newcommand{\tipxref}[1]{}
\newcommand{\tipxrefend}{}
\else
\newcommand{\tipimage}[2]{\typeout{Make sure you create #1.pdf}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.pdf}}{\includegraphics[width=0.8\textwidth]{#1.pdf}}}
\pdfcatalog{/PageMode /UseOutlines}
\newcommand{\tipxref}[1]{\pdfannotlink attr {/C [0.5 0.5 1.0] /Border [0 0 1]} goto name {#1}}
\newcommand{\tipxrefend}{\pdfendlink}
\fi
\newenvironment{tipabstract}{\begin{abstract}}{\end{abstract}}
\begin{document}\maketitle
\begin{center}\begin{tabularx}{\linewidth}{|r@{: }X|}\hline
\textbf{TIP \#444}&\textbf{Add "weekdays" unit in clock add}\\\hline
Author&

Pietro Cerutti \tipmail{gahr}{gahr.ch}
\\
Created&Tuesday, \(\text{23}^{\text{rd}}\) February 2016\\
Type&Project\\
Tcl Version&\(8.7\)\\
State&Final\\
Vote&Done\\
Version&\tipversion$Revision: 1.6 $\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

This TIP proposes an enhancement to the \textbf{clock add} command to support performing days arithmetic using weekdays only.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Rationale}

The \textbf{clock add} command allows to perform time arithmetic using a variety of time units, including days. However, it offers no easy way to skip weekends. It is often desired to perform weekdays arithmetic that involves adding or subtracting a number of non-weekend days to a certain date. This is useful in example when computing delivery dates.

\section{Proposal}

The \textbf{weekdays} time-unit is added to the list accepted by the \textbf{clock add} command. The \textbf{count} argument represents weekdays (Mon-Fri) to be added (or subtracted in case of a negative value) to the date. The result of adding weekdays to a date is never a weekend day, unless the starting day is itself a weekend day and \textbf{count} is 0.

\section{Reference Implementation}

Available at \url{http://core.tcl.tk/tcl/timeline?t=tip-444}

\section{Discussion}

A point has been raised as to whether \textit{weekday} is unambiguous enough. For instance, in Sweden there seems to be some disagreement on whether the translation \textit{vardag} includes Saturdays. As an alternative, the term \textit{workday} has been mentioned. This, however, has the downside of introducing the concept of working days vs. public holiday. Also, the working week is not Mon-Fri in all countries, see [\url{https://en.wikipedia.org/wiki/Workweek_and_weekend\#Around_the_world}].

TIP does not try to accomodate locale-specific features and characteristics. For this reason, it seems best to stick to \textit{weekday} as the name of the unit and specifically mention that (Mon-Fri) is intended in the documentation.

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\end{document}
