CLucene - a full-featured, c++ search engine
API Documentation
00001 /*------------------------------------------------------------------------------ 00002 * Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team 00003 * 00004 * Distributable under the terms of either the Apache License (Version 2.0) or 00005 * the GNU Lesser General Public License, as specified in the COPYING file. 00006 ------------------------------------------------------------------------------*/ 00007 #ifndef _lucene_document_DateField_ 00008 #define _lucene_document_DateField_ 00009 00010 #if defined(_LUCENE_PRAGMA_ONCE) 00011 # pragma once 00012 #endif 00013 00014 CL_NS_DEF(document) 00015 00016 //here are some constants used throughout clucene 00017 //make date strings long enough to last a millenium 00018 #define DATEFIELD_DATE_MAX _ILONGLONG(31536000000000) //1000L*365*24*60*60*1000 00019 00020 #define DATEFIELD_DATE_LEN 9 00021 00022 00041 class DateField :LUCENE_BASE { 00042 public: 00043 ~DateField(); 00044 00050 static TCHAR* timeToString(const int64_t time); 00051 00058 static void timeToString(const int64_t time, TCHAR* str); 00059 00061 static int64_t stringToTime(const TCHAR* s); 00062 }; 00063 CL_NS_END 00064 #endif