Hi,
What would be the simplest way to convert strings like Wed, 07 Dec 2011
10:09:21 + to System.Time.ClockTime ?
Thanks!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I'm not sure if you really need ClockTime (from old-time), but if you
don't, the types from the 'time' package are all parseable with
`parseTime` [1].
Erik
[1]
http://hackage.haskell.org/packages/archive/time/latest/doc/html/Data-Time-Format.html#v:parseTime
On Thu, Dec 8, 2011 at 14:16,
I need to parse time strings like Wed, 07 Dec 2011 10:09:21 + to a
type that:
1) implements Eq, Ord
2) is numerical, so I could subtract one value from another to find the
difference or interval length
To answer 1) requirement I wrote the following snippet. Yet I could not
subtract UTCTime
Now, when I have managed to convert UTCTime to seconds (see code below) I
got stuck trying to convert from UTCTime to CalendarTime, how to do this?
import Data.Time.Format
import Data.Time.Clock
import Locale
import Data.Maybe
import Data.Time.Clock.POSIX
s1 = Wed, 07 Dec 2011 10:09:21 +
s2
On Thu, Dec 8, 2011 at 9:01 AM, dokondr doko...@gmail.com wrote:
Now, when I have managed to convert UTCTime to seconds (see code below) I
got stuck trying to convert from UTCTime to CalendarTime, how to do this?
It might be easier to use 'diffUTCTime' and 'addUTCTime' instead of
converting
On Thu, Dec 8, 2011 at 9:13 AM, Antoine Latter aslat...@gmail.com wrote:
On Thu, Dec 8, 2011 at 9:01 AM, dokondr doko...@gmail.com wrote:
Now, when I have managed to convert UTCTime to seconds (see code below) I
got stuck trying to convert from UTCTime to CalendarTime, how to do this?
It
Ok, maybe you could advise what packages to use for this simple scenario:
I have two text strings with dates:
s1 = Wed, 07 Dec 2011 10:09:21 +
s2 = Wed, 07 Dec 2011 10:11:00 +
I need:
1) Find how many seconds are between these dates
2) Calculate the date in the middle between these
On Thu, Dec 8, 2011 at 9:30 AM, dokondr doko...@gmail.com wrote:
Ok, maybe you could advise what packages to use for this simple scenario:
I have two text strings with dates:
s1 = Wed, 07 Dec 2011 10:09:21 +
s2 = Wed, 07 Dec 2011 10:11:00 +
I need:
1) Find how many seconds are
On Thu, Dec 8, 2011 at 7:39 PM, Antoine Latter aslat...@gmail.com wrote:
On Thu, Dec 8, 2011 at 9:30 AM, dokondr doko...@gmail.com wrote:
Ok, maybe you could advise what packages to use for this simple scenario:
I have two text strings with dates:
s1 = Wed, 07 Dec 2011 10:09:21 +