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
13 {-# LANGUAGE NoImplicitPrelude #-}
14 {-# LANGUAGE OverloadedStrings #-}
16 module Gargantext.Text.Corpus.Parsers.Date.Attoparsec
19 import Control.Applicative ((<*))
20 import Data.Attoparsec.ByteString (Parser, take)
21 import Data.ByteString (ByteString)
22 import Data.Monoid ((<>))
23 import Data.Tuple.Extra (first)
24 import Gargantext.Prelude hiding (takeWhile, take)
26 -------------------------------------------------------------
28 parserWith :: Parser ByteString -> Parser [(ByteString, ByteString)]
33 pure $ map (first (\x -> "publication_" <> x))
37 , ("date", yea <> "-" <> mon <> "-" <> day <> "T0:0:0")