MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / getDateTimeFormatted

Function getDateTimeFormatted

packages/ui/src/views/serverlogs/index.jsx:62–70  ·  view source on GitHub ↗
(date)

Source from the content-addressed store, hash-verified

60}
61
62const getDateTimeFormatted = (date) => {
63 const now = date ? date : new Date()
64 const year = now.getFullYear()
65 const month = (now.getMonth() + 1).toString().padStart(2, '0') // +1 because getMonth() returns 0 for January, 1 for February, etc.
66 const day = now.getDate().toString().padStart(2, '0')
67 const hour = now.getHours().toString().padStart(2, '0')
68
69 return `${year}-${month}-${day}-${hour}`
70}
71
72const subtractTime = (months, days, hours) => {
73 let checkDate = new Date()

Callers 4

onStartDateSelectedFunction · 0.85
onEndDateSelectedFunction · 0.85
LogsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected