dependencies: Remove XDate.

It’s even more unmaintained than Moment and doesn’t add any
functionality we don’t already have.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-02-05 12:20:14 -08:00
committed by Steve Howell
parent 952a8aa5fd
commit 9896782fd1
27 changed files with 154 additions and 204 deletions

View File

@@ -2,7 +2,6 @@
const {subDays} = require("date-fns");
const Handlebars = require("handlebars/runtime");
const XDate = require("xdate");
const render_draft_table_body = require("../templates/draft_table_body.hbs");
@@ -221,7 +220,7 @@ exports.remove_old_drafts = function () {
exports.format_draft = function (draft) {
const id = draft.id;
let formatted;
const time = new XDate(draft.updatedAt);
const time = new Date(draft.updatedAt);
let time_stamp = timerender.render_now(time).time_str;
if (time_stamp === i18n.t("Today")) {
time_stamp = timerender.stringify_time(time);