Skip to content

Commit

Permalink
Add a deconstruction function for DotNetTime
Browse files Browse the repository at this point in the history
  • Loading branch information
bos committed Mar 10, 2011
1 parent b3e9a97 commit 3b4e0d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Data/Aeson/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,9 @@ instance FromJSON Value where

-- | A newtype wrapper for 'UTCTime' that uses the same non-standard
-- serialization format as Microsoft .NET.
newtype DotNetTime = DotNetTime UTCTime
deriving (Eq, Ord, Read, Show, Typeable, FormatTime)
newtype DotNetTime = DotNetTime {
fromDotNetTime :: UTCTime
} deriving (Eq, Ord, Read, Show, Typeable, FormatTime)

instance ToJSON DotNetTime where
toJSON (DotNetTime t) =
Expand Down

0 comments on commit 3b4e0d8

Please sign in to comment.