\LoadClass{article}

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{template}

\RequirePackage{titlesec}

\titleformat{\section}
{\large\scshape\raggedright}
{}{0em}
{}
[\titlerule]

\titleformat{\subsection}
{\raggedright}
{}{0em}
{}
\titlespacing*{\subsection}{0pt}{3.5ex plus 1ex minus .2ex}{-2.5ex}

\newcommand{\sechline}{%
  \noindent
  \makebox[\linewidth]{
    \rule{\textwidth}{0.4pt}
  }
}

\newcommand{\datedlocatedsubsection}[4]{%
  \subsection[#2]{#3 \hfill \small{\textlf{\scshape{#2}}}}%
  \begin{minipage}{5cm}
    \vspace*{-.7ex}\hspace*{-3cm}\footnotesize #1
  \end{minipage}
  \raggedright

  \begin{small}
    #4
  \end{small}
}

\newcommand{\datedsubsection}[3]{%
  \subsection[#2]{#2}%
  \begin{minipage}{5cm}
    \vspace*{-.7ex}\hspace*{-3cm}\footnotesize #1
  \end{minipage}
  \raggedright

  \begin{small}
    #3
  \end{small}
}
