MCPcopy Create free account
hub / github.com/Superflows-AI/superflows / convertIsoToHumanReadable

Function convertIsoToHumanReadable

lib/v3/utils.ts:34–51  ·  view source on GitHub ↗
(dateStr: string)

Source from the content-addressed store, hash-verified

32];
33
34export function convertIsoToHumanReadable(dateStr: string): string {
35 let date = new Date(dateStr);
36
37 let day = date.getDate();
38 let monthIndex = date.getMonth();
39 let year = date.getFullYear();
40
41 let suffix = "th";
42 if ([1, 21, 31].includes(day)) {
43 suffix = "st";
44 } else if ([2, 22].includes(day)) {
45 suffix = "nd";
46 } else if ([3, 23].includes(day)) {
47 suffix = "rd";
48 }
49
50 return `${day}${suffix} ${monthNames[monthIndex]} ${year}`;
51}
52
53export function fillVariables(
54 requests: {

Callers 2

utils.test.tsFile · 0.90
getUserMessageTextFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected