Lucene.Net 1.9.1 Class Library

DateTools.Round Method (Int64, Resolution)

Limit a date's resolution. For example, the date

1095767411000
(which represents 2004-09-21 13:50:11) will be changed to
1093989600000
(2004-09-01 00:00:00) when using
Resolution.MONTH
.

public static long Round(
   long time,
   Resolution resolution
);

Parameters

time
resolution
The desired resolution of the date to be returned

Return Value

the date with all values more precise than

resolution
set to 0 or 1, expressed as milliseconds since January 1, 1970, 00:00:00 GMT

See Also

DateTools Class | Lucene.Net.Documents Namespace | DateTools.Round Overload List