mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
user status: Changes to Last active field of Full User Profile.
If a user was active within the last 90 days, show number of days (23 Days ago). If the user was active more than 90 days ago and in the same year, then show MMM DD (Mar 15). In any other case show MMM DD YYYY (Nov 10 2018), Change timerender.js test to accomodate changes.
This commit is contained in:
@@ -252,19 +252,25 @@ run_test('last_seen_status_from_date', () => {
|
||||
i18n.t("Yesterday"));
|
||||
|
||||
assert_same(function (d) { return d.addDays(-2); },
|
||||
i18n.t("On Feb 28"));
|
||||
i18n.t("2 days ago"));
|
||||
|
||||
assert_same(function (d) { return d.addDays(-61); },
|
||||
i18n.t("On Dec 31"));
|
||||
i18n.t("61 days ago"));
|
||||
|
||||
assert_same(function (d) { return d.addDays(-300); },
|
||||
i18n.t("On May 06"));
|
||||
i18n.t("May 06,\xa02015"));
|
||||
|
||||
assert_same(function (d) { return d.addDays(-366); },
|
||||
i18n.t("On Mar 01, 2015"));
|
||||
i18n.t("Mar 01,\xa02015"));
|
||||
|
||||
assert_same(function (d) { return d.addYears(-3); },
|
||||
i18n.t("On Mar 01, 2013"));
|
||||
i18n.t("Mar 01,\xa02013"));
|
||||
|
||||
// Set base_dateto to May 1 2016 12.30 AM (months are zero based)
|
||||
base_date = new XDate(2016, 4, 1, 0, 30);
|
||||
|
||||
assert_same(function (d) { return d.addDays(-91); },
|
||||
i18n.t("Jan\xa031"));
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user