gedcom-0.2.0.0: Parser for the GEDCOM genealogy file format.

Copyright(c) Callum Lowcay 2017
LicenseBSD3
Maintainercwslowcay@gmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Data.Gedcom.Internal.Common

Description

 

Synopsis

Documentation

(<&>) :: Functor f => f a -> (a -> b) -> f b infixl 1 Source #

Flipped version of <$>

withDefault :: Alternative f => a -> f a -> f a Source #

Replace failure with a default value

trim :: Text -> Text Source #

Trim leading and trailing whitespace off a string

type Parser = Parsec Void Text Source #

Parsers from Text using the default error component.

timeToPicos :: (Int, Int, Int, Double) -> DiffTime Source #

Convert h:m:s.fs time to DiffTime

timeValue :: Parser (Maybe (Int, Int, Int, Double)) Source #

Parse a GEDCOM exact time value into (h, m, s, fs) format

dateExact :: Parser (Int, Word, Int) Source #

Parse a GEDCOM exact date into (day, month, year). Months are number from 1 to 12.

month :: Parser Word Source #

Parse a Gregorian/Julian month

monthFr :: Parser Word Source #

Parse a French calendar month

monthHeb :: Parser Word Source #

Parse a Hebrew calendar month

yearGreg :: Parser Int Source #

Parse a Gregorian year. GEDCOM allows one to specify two versions of the same year for cases where the historical year started in March instead of January. This function attempts to return the modern year number (assuming the year starts in January.