Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data DateConfig = DateConfig {}
- defaultDateConfigWith :: TimeLocale -> ZonedTime -> DateConfig
- dateFields :: DateConfig -> Context a
- dateFormatField :: String -> TimeLocale -> Context a
- dateField :: String -> TimeLocale -> ZonedTime -> Context a
- publishedField :: String -> TimeLocale -> Context a
- updatedField :: String -> TimeLocale -> Context a
- getLastModifiedDate :: TimeLocale -> Item a -> Compiler ZonedTime
- isPublishedField :: String -> Context a
- isUpdatedField :: String -> Context a
- dateFromMetadata :: TimeLocale -> [String] -> Metadata -> Maybe String
- normalizedDateTimeFormat :: String
- parseTimeM' :: MonadFail m => TimeLocale -> String -> String -> m ZonedTime
Documentation
data DateConfig Source #
DateConfig | |
|
defaultDateConfigWith :: TimeLocale -> ZonedTime -> DateConfig Source #
Creates a default date configuration with the given locale and current time.
dateFields :: DateConfig -> Context a Source #
Creates a default date fields configuration with the given date config.
dateFormatField :: String -> TimeLocale -> Context a Source #
Gets a date formatted with the given format.
dateField :: String -> TimeLocale -> ZonedTime -> Context a Source #
Gets the date relative to the configured time locale and current time from the "date" or "published" fields.
publishedField :: String -> TimeLocale -> Context a Source #
Gets the published date of an item from the metadata fields "published" or "date".
updatedField :: String -> TimeLocale -> Context a Source #
Gets the updated date of an item from the metadata fields "updated", "published", or "date".
getLastModifiedDate :: TimeLocale -> Item a -> Compiler ZonedTime Source #
Gets the last modified date of an item from the metadata fields "updated", "published", or "date", or the file path if it contains a date.
isPublishedField :: String -> Context a Source #
Gets whether the item is published.
isUpdatedField :: String -> Context a Source #
Gets whether the item has been updated.
:: TimeLocale | The time locale to use. |
-> [String] | The list of metadata keys to search for. |
-> Metadata | |
-> Maybe String |
Gets a date from the given metadata fields.
parseTimeM' :: MonadFail m => TimeLocale -> String -> String -> m ZonedTime Source #