Commits

Bryan O'Sullivan  committed 912f7df

Add a deconstruction function for DotNetTime

  • Participants
  • Parent commits db90dcc

Comments (0)

Files changed (1)

File Data/Aeson/Types.hs

 
 -- | 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) =