aboutsummaryrefslogtreecommitdiff
path: root/src/Model/Birthdate.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model/Birthdate.hs')
-rw-r--r--src/Model/Birthdate.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Model/Birthdate.hs b/src/Model/Birthdate.hs
index 32bd6a4..f871860 100644
--- a/src/Model/Birthdate.hs
+++ b/src/Model/Birthdate.hs
@@ -2,8 +2,10 @@
module Model.Birthdate
( Birthdate(..)
+ , renderBirthdate
, fullname
, age
+ , ageNextWeek
, filterBirthdayAt
, filterBirthdayBetween
) where
@@ -19,6 +21,15 @@ data Birthdate = Birthdate
, lastname :: Text
} deriving (Eq, Show)
+renderBirthdate :: Birthdate -> Text
+renderBirthdate birthdate =
+ T.concat
+ [ fullname birthdate
+ , " ("
+ , renderDate (date birthdate)
+ , ")"
+ ]
+
fullname :: Birthdate -> Text
fullname d = T.concat [firstname d, " ", lastname d]