Apache Lucene.Net 2.4.0 Class Library API

DateTools.Round Method

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

2004-09-21 13:50:11
will be changed to
2004-09-01 00:00:00
when using
Resolution.MONTH
.

Overload List

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

2004-09-21 13:50:11
will be changed to
2004-09-01 00:00:00
when using
Resolution.MONTH
.

public static DateTime Round(DateTime,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,Resolution);

See Also

DateTools Class | Lucene.Net.Documents Namespace