-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatted date #239
Comments
{-# LANGUAGE OverloadedStrings #-}
import Turtle
main :: IO ()
main = do
d <- date
printf (utc%"\n") d That formats the date using the following format which just uses the default 2017-06-07 17:14:33.278543 UTC If you have other date/time formats in mind that you'd like |
Hmm, how about ISO 8601? I'm mostly interested in YYYY-MM-DDThh:mm:ss representation. |
Technically that is an ISO 8601-compliant format. |
Well, yeah. But I think it makes sense to add more atomic control over format, for instance, showing just date or time. |
So I can provide an https://hackage.haskell.org/package/time-1.8.0.2/docs/Data-Time-Format.html |
What is the preferred way to get formatted date (e.g.
date +%F
in shell)?Thanks.
The text was updated successfully, but these errors were encountered: