src/English/timex/en_TemporalNormalizer.cpp
/**
 * Looks at the last 6 characters of a string that that is >6 characters long.
 * If this substring looks like "+nnsxx" or "-nnsxx", where "nn" represents
 * a number between 01 and 24 (and "s" presumably is a time separator, though
 * this is not checked), return "+nn" or "-nn", respectively.
 **/
Looks at the last 6 characters of a string that that is >6 characters long.
Looks at the last 6 characters of a string that that is > 6 characters long .
wstring EnglishTemporalNormalizer::getAdditionalDocTime(const wstring & originalDtString) {
	wstring dtString = boost::algorithm::trim_copy(originalDtString);
	size_t length = dtString.length();
	if (length > 6 &&
			(dtString.at(length - 6) == L'+' || dtString.at(length - 6) == L'-'))
	{
		int hours = Strings::parseInt(dtString.substr(length - 5, 2));
		if (hours > 0 && hours < 25)
			return dtString.substr(length - 6, 3);
	}
	return L"";
}
wstring EnglishTemporalNormalizer :: getAdditionalDocTime ( const wstring & originalDtString ) { wstring dtString = boost :: algorithm :: trim_copy ( originalDtString ) ; size_t length = dtString . length ( ) ; if ( length > 6 && ( dtString . at ( length - 6 ) == L' ' || dtString . at ( length - 6 ) == L' ' ) ) { int hours = Strings :: parseInt ( dtString . substr ( length - 5 , 2 ) ) ; if ( hours > 0 && hours < 25 ) return dtString . substr ( length - 6 , 3 ) ; } return L" " ; }
Looks at the last 6 characters of a string that that is >6 characters long.
Looks at the last 6 characters of a string that that is > 6 characters long .