MomentJS Date Parsing issue #46

Open
opened 2023-09-30 21:02:40 +01:00 by fred.boniface · 0 comments

From staffStation.ts:

function transformUnspecifiedDateTime(input: string): Date | undefined {
  logger.trace(
    "utils/translators/ldb/staffStation.transformUnspecifiedDateTime: Running"
  );
  if (!input) {
    return undefined;
  }
  const date = tz(input, "Europe/London");
  return date.toDate();
}

This usage of MomentJS is deprecated and will be removed in a future release. A moment object should be created using moment.ts(...) before converting that to a JS Date object.

Alternatively, the module could be updated to use moment objects throughout although the features offered aren't required beyond this function.

From staffStation.ts: ``` function transformUnspecifiedDateTime(input: string): Date | undefined { logger.trace( "utils/translators/ldb/staffStation.transformUnspecifiedDateTime: Running" ); if (!input) { return undefined; } const date = tz(input, "Europe/London"); return date.toDate(); } ``` This usage of MomentJS is deprecated and will be removed in a future release. A moment object should be created using `moment.ts(...)` before converting that to a JS Date object. Alternatively, the module could be updated to use moment objects throughout although the features offered aren't required beyond this function.
fred.boniface added the
bug
backend
labels 2023-09-30 21:02:40 +01:00
fred.boniface self-assigned this 2023-09-30 21:02:41 +01:00
fred.boniface added this to the Feb 2023 Release milestone 2023-11-09 14:40:35 +00:00
Sign in to join this conversation.
No description provided.