SIP-686 changed mod_say (en) to speak full dates when asked to speak a date in the future (rather than only weekday and time).

This commit is contained in:
Michael MCGuinness 2014-04-07 16:21:22 -04:00 committed by Brian West
parent 607247397c
commit 974cebd389
1 changed files with 9 additions and 0 deletions

View File

@ -306,6 +306,15 @@ static switch_status_t en_say_time(switch_say_file_handle_t *sh, char *tosay, sw
break;
case SST_SHORT_DATE_TIME:
say_time = 1;
//Time is in the future
if ((tm.tm_year > tm_now.tm_year) ||
(tm.tm_year == tm_now.tm_year && tm.tm_mon > tm_now.tm_mon) ||
(tm.tm_year == tm_now.tm_year && tm.tm_mon == tm_now.tm_mon && tm.tm_mday > tm_now.tm_mday))
{
say_date = 1;
break;
}
//Time is today or earlier
if (tm.tm_year != tm_now.tm_year) {
say_date = 1;
break;