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

Function formatDate

dlp/listInspectTemplates.js:32–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31 // Helper function to pretty-print dates
32 const formatDate = date => {
33 const msSinceEpoch = parseInt(date.seconds, 10) * 1000;
34 return new Date(msSinceEpoch).toLocaleString('en-US');
35 };
36
37 async function listInspectTemplates() {
38 // Construct template-listing request

Callers 1

listInspectTemplatesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected