You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,32 @@ You can register print handlers for new types using
92
92
`lambdaisland.deep-diff2.printer/register-print-handler!`, or by passing and
93
93
`:extra-handlers` map to `printer`.
94
94
95
+
Note: the default printer is initialized as `(ddiff/printer {:print-fallback :print})` so that it will fall back to system printer when there is no match.
96
+
97
+
### Time, data literal
98
+
99
+
One of the creative ways of using deep-diff is to diff two time data.
100
+
101
+
```
102
+
(ddiff/diff #inst "2019-04-09T14:57:46.128-00:00"
103
+
#inst "2019-04-10T14:57:46.128-00:00")
104
+
```
105
+
or
106
+
```
107
+
(import '[java.sql Timestamp])
108
+
(ddiff/diff (Timestamp. 0)
109
+
(doto (Timestamp. 1000) (.setNanos 101)))
110
+
```
111
+
112
+
If you need to diff a rich set of time literal, using [time-literals](https://github.com/henryw374/time-literals) is probably a good choice.
0 commit comments