[commit: packages/old-locale] master: Update Haddock comments (7e7f672)
git at git.haskell.org
git at git.haskell.org
Sat Mar 22 08:51:44 UTC 2014
Repository : ssh://git@git.haskell.org/old-locale
On branch : master
Link : http://git.haskell.org/packages/old-locale.git/commitdiff/7e7f6722895af36ca4e2f60f2fdfdc056b70db0b
>---------------------------------------------------------------
commit 7e7f6722895af36ca4e2f60f2fdfdc056b70db0b
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Sat Mar 22 09:51:11 2014 +0100
Update Haddock comments
Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>
>---------------------------------------------------------------
7e7f6722895af36ca4e2f60f2fdfdc056b70db0b
System/Locale.hs | 20 ++++++++++++++------
changelog.md | 2 ++
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/System/Locale.hs b/System/Locale.hs
index c9469db..2a87af2 100644
--- a/System/Locale.hs
+++ b/System/Locale.hs
@@ -6,16 +6,17 @@
-- |
-- Module : System.Locale
-- Copyright : (c) The University of Glasgow 2001
--- License : BSD-style (see the file libraries/base/LICENSE)
+-- License : BSD3 (see LICENSE file)
--
-- Maintainer : libraries at haskell.org
-- Stability : stable
-- Portability : portable
--
-- This module provides the ability to adapt to local conventions.
+--
-- At present, it supports only time and date information as used by
--- System.Time.calendarTimeToString from the System.Time module in the
--- old-time package.
+-- @calendarTimeToString@ from the @System.Time@ module in the
+-- @old-time@ package.
--
-----------------------------------------------------------------------------
@@ -76,8 +77,15 @@ defaultTimeLocale = TimeLocale {
}
--- |Normally, ISO-8601 just defines YYYY-MM-DD
--- but we can add a time spec.
+{- | Construct format string according to <http://en.wikipedia.org/wiki/ISO_8601 ISO-8601>.
+
+The @Maybe String@ argument allows to supply an optional time specification. E.g.:
+
+@
+'iso8601DateFormat' Nothing == "%Y-%m-%d" -- i.e. @/YYYY-MM-DD/@
+'iso8601DateFormat' (Just "%H:%M:%S") == "%Y-%m-%dT%H:%M:%S" -- i.e. @/YYYY-MM-DD/T/HH:MM:SS/@
+@
+-}
iso8601DateFormat :: Maybe String -> String
iso8601DateFormat mTimeFmt =
@@ -85,6 +93,6 @@ iso8601DateFormat mTimeFmt =
Nothing -> ""
Just fmt -> 'T' : fmt
-
+-- | Format string according to <http://tools.ietf.org/html/rfc822#section-5 RFC822>.
rfc822DateFormat :: String
rfc822DateFormat = "%a, %_d %b %Y %H:%M:%S %Z"
diff --git a/changelog.md b/changelog.md
index 7f59c7a..65ba802 100644
--- a/changelog.md
+++ b/changelog.md
@@ -4,6 +4,8 @@
* Bundled with GHC 7.8.1
+ * Update Haddock comments
+
* Update to Cabal 1.10 format
## 1.0.0.5 *Sep 2012*
More information about the ghc-commits
mailing list