]> Git — Sourcephile - comptalang.git/blob - lib/Hcompta/Model/Date.hs
Ajout : lib/Hcompta/ : structures de données
[comptalang.git] / lib / Hcompta / Model / Date.hs
1 {-# LANGUAGE DeriveDataTypeable #-}
2 module Hcompta.Model.Date
3 ( module Hcompta.Model.Date
4 , Day
5 )
6 where
7
8 import Data.Data
9 import Data.Time.Calendar (Day)
10 import Data.Time.Format ()
11 import Data.Typeable ()
12
13 type Smart =
14 (String, String, String)
15
16 data Which
17 = Primary
18 | Secondary
19 deriving (Eq, Read, Show)
20
21 data Span
22 = Span (Maybe Day) (Maybe Day)
23 deriving (Data, Eq, Ord, Read, Show, Typeable)
24
25 data Interval
26 = NoInterval
27 | Days Int
28 | Weeks Int
29 | Months Int
30 | Quarters Int
31 | Years Int
32 | DayOfMonth Int
33 | DayOfWeek Int
34 -- WeekOfYear Int | MonthOfYear Int | QuarterOfYear Int
35 deriving (Data, Eq, Ord, Read, Show, Typeable)