奇怪的行爲,這是我的資源鍵:檢票 - 與參數StringResourceModel
Expired {0} days ago
這是StringResourceModel的定義:
new StringResourceModel("store.expired.tooltip", null, Days.daysBetween(expirationDate, refDate));
預期的結果會是這樣的Expired 20 days
前,但實際結果是Expired P20D ago
。
任何想法是什麼造成這種情況?我想我做everything right但不確定。
'days#daysBetween'是什麼?它返回什麼?如果它返回一個對象,它是什麼類,並且這個類是否實現'toString()'? – npe 2012-07-21 14:29:36
@npe - 查看我的回答 – 2012-07-21 14:32:45
@DonRoby:是的,你剛剛得到我的祝福! :) – npe 2012-07-21 14:33:23