Modify date time string for event metadata
parent
1bac67fa5b
commit
a792cdd17a
|
|
@ -133,7 +133,7 @@ function getEventMeta(req, res, id){
|
|||
<meta property="og:url" content="`+ evntUrl +`"/>
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="` + event.title + `" />
|
||||
<meta property="og:description" content="` + nd.toLocaleString() + ` | ` + event.description + `" />
|
||||
<meta property="og:description" content="` + dateToString(nd) + ` | ` + event.description + `" />
|
||||
<meta property="og:image" content="` + imageUrl + `"/>
|
||||
<meta property="og:image:width" content="200" />
|
||||
<meta property="og:image:height" content="200" />
|
||||
|
|
@ -147,6 +147,12 @@ function getEventMeta(req, res, id){
|
|||
});
|
||||
}
|
||||
|
||||
function dateToString(dte){
|
||||
var val = dte.toLocaleString([],{ timeZone: 'America/Denver', day: 'numeric', month: 'numeric', year: 'numeric', hour: 'numeric', minute:'2-digit'});
|
||||
console.log(val);
|
||||
return val;
|
||||
}
|
||||
|
||||
const MONTHS_FULL = {
|
||||
0: "JANUARY",
|
||||
1: "FEBRUARY",
|
||||
|
|
|
|||
Loading…
Reference in New Issue