MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / formatDate

Function formatDate

dlp/listTriggers.js:40–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38
39 // Helper function to pretty-print dates
40 const formatDate = date => {
41 const msSinceEpoch = parseInt(date.seconds, 10) * 1000;
42 return new Date(msSinceEpoch).toLocaleString('en-US');
43 };
44
45 // Run trigger listing request
46 const [triggers] = await dlp.listJobTriggers(request);

Callers 1

listTriggersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected