2 Module : Gargantext.Text.Corpus.Parsers.Date.Attoparsec
4 Copyright : (c) CNRS, 2017-Present
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
14 module Gargantext.Text.Corpus.Parsers.Date.Attoparsec
17 import Control.Applicative ((<*))
18 import Data.Attoparsec.ByteString (Parser, take)
19 import Data.ByteString (ByteString)
20 import Data.Monoid ((<>))
21 import Data.Tuple.Extra (first)
22 import Gargantext.Prelude hiding (takeWhile, take)
24 -------------------------------------------------------------
26 parserWith :: Parser ByteString -> Parser [(ByteString, ByteString)]
31 pure $ map (first (\x -> "publication_" <> x))
35 , ("date", yea <> "-" <> mon <> "-" <> day <> "T0:0:0")