2 Commits 3e6fa8e628 ... 05c8b51811

Author SHA1 Message Date
  Emilia Blåsten 05c8b51811 Merge branch 'master' into deploy_drblasten 4 years ago
  Emilia Blåsten e8688c8382 Update CV age automatically 4 years ago
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/pdf/blasten_CV.tex

+ 9 - 1
src/pdf/blasten_CV.tex

@@ -14,6 +14,14 @@
   linkcolor=black,
   urlcolor={blue!80!black}
 }
+\usepackage{ifthen}
+\newcounter{myage}
+\setcounter{myage}{\the\year}
+\addtocounter{myage}{-1987}
+\ifthenelse{\the\month<06}{\addtocounter{myage}{-1}}{}
+\ifthenelse{\the\month=06}{
+  \ifthenelse{\the\day < 23}{\addtocounter{myage}{-1}}{}
+  }{}
 
 
 \begin{document}
@@ -37,7 +45,7 @@
 % "@{}" will make the column separator on the left be the empty string "" instead of the default (which might be \quad?)
 \begin{tabular}{@{}p{4.2cm}p{9.0cm}}
   Name & \textbf{Bl{\r a}sten}, Emilia\\
-  Date of birth & June 23, 1987 (age: 31)\\
+  Date of birth & June 23, 1987 (age: \themyage{})\\
   Place of birth & Helsinki, Finland\\
   Nationality & Finnish\\
   \  & \ \\