File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,9 @@ declare namespace dayjs {
286286 * const date1 = dayjs('2019-01-25')
287287 * const date2 = dayjs('2018-06-05')
288288 * date1.diff(date2) // 20214000000 default milliseconds
289+ * date1.diff() // milliseconds to current time
289290 * ```
291+ *
290292 * To get the difference in another unit of measurement, pass that measurement as the second argument.
291293 * ```
292294 * const date1 = dayjs('2019-01-25')
@@ -296,7 +298,7 @@ declare namespace dayjs {
296298 *
297299 * Docs: https://day.js.org/docs/en/display/difference
298300 */
299- diff ( date : ConfigType , unit ?: QUnitType | OpUnitType , float ?: boolean ) : number
301+ diff ( date ? : ConfigType , unit ?: QUnitType | OpUnitType , float ?: boolean ) : number
300302 /**
301303 * This returns the number of **milliseconds** since the Unix Epoch of the Day.js object.
302304 * ```
You can’t perform that action at this time.
0 commit comments