[Issue 1105] Add Parameter "format" to scroll list cells to define how a date cell will format its displayed date

Defaults to use RFC1123 to maintain expected behavior
This commit is contained in:
Inusaito Sayori
2013-09-19 23:29:36 -04:00
parent ae38835959
commit 892d224b9c
2 changed files with 5 additions and 1 deletions

View File

@@ -438,13 +438,14 @@ void LLScrollListCheck::setEnabled(BOOL enable)
LLScrollListDate::LLScrollListDate( const LLScrollListCell::Params& p)
: LLScrollListText(p),
mFormat(p.format),
mDate(p.value().asDate())
{}
void LLScrollListDate::setValue(const LLSD& value)
{
mDate = value.asDate();
LLScrollListText::setValue(mDate.asRFC1123());
LLScrollListText::setValue(mFormat.empty() ? mDate.asRFC1123() : mDate.toHTTPDateString(mFormat));
}
const LLSD LLScrollListDate::getValue() const