MCPcopy Index your code
hub / github.com/OpenSignLabs/OpenSign / formatDateTime

Function formatDateTime

apps/OpenSign/src/constant/Utils.js:4253–4263  ·  view source on GitHub ↗
(date, dateFormat, timeZone, is12Hour)

Source from the content-addressed store, hash-verified

4251};
4252
4253export function formatDateTime(date, dateFormat, timeZone, is12Hour) {
4254 const zonedDate = toZonedTime(date, timeZone); // Convert date to the given timezone
4255 const timeFormat = is12Hour ? "hh:mm:ss a" : "HH:mm:ss";
4256 return dateFormat
4257 ? format(
4258 zonedDate,
4259 `${selectFormat(dateFormat)}, ${timeFormat} 'GMT' XXX`,
4260 { timeZone }
4261 )
4262 : formatTimeInTimezone(date, timeZone);
4263}
4264
4265export const updateDateWidgetsRes = (
4266 documentData,

Callers 2

DateFormatSelectorFunction · 0.90
formatFunction · 0.90

Calls 3

formatFunction · 0.85
selectFormatFunction · 0.70
formatTimeInTimezoneFunction · 0.70

Tested by

no test coverage detected