1
1
mirror of https://github.com/srid/rib.git synced 2024-11-22 11:23:02 +03:00

Allow an older version of time

This commit is contained in:
Sridhar Ratnakumar 2020-05-11 22:27:40 -04:00
parent c623ff953d
commit f5643c1078
2 changed files with 4 additions and 3 deletions

View File

@ -56,7 +56,8 @@ common library-common
safe-exceptions, safe-exceptions,
shake >= 0.18.5, shake >= 0.18.5,
text >=1.2.3 && <1.3, text >=1.2.3 && <1.3,
time >= 1.9, time,
iso8601-time,
wai >=3.2.2 && <3.3, wai >=3.2.2 && <3.3,
wai-app-static >=3.1.6 && <3.2, wai-app-static >=3.1.6 && <3.2,
warp warp

View File

@ -12,7 +12,7 @@ module Rib.Extra.OpenGraph
where where
import Data.Time (UTCTime) import Data.Time (UTCTime)
import Data.Time.Format.ISO8601 (formatShow, iso8601Format) import Data.Time.ISO8601 (formatISO8601)
import Lucid import Lucid
import Lucid.Base (makeAttribute) import Lucid.Base (makeAttribute)
import Relude import Relude
@ -84,7 +84,7 @@ instance ToHtml Article where
metaOg "article:tag" `mapM_` _article_tag metaOg "article:tag" `mapM_` _article_tag
where where
metaOgTime k t = metaOgTime k t =
metaOg k $ toText $ formatShow iso8601Format t metaOg k $ toText $ formatISO8601 t
-- Open graph meta element -- Open graph meta element
metaOg :: Applicative m => Text -> Text -> HtmlT m () metaOg :: Applicative m => Text -> Text -> HtmlT m ()