date format
This commit is contained in:
parent
93ba2a60f0
commit
9a60cb5ee7
11
_content/cases/otc-irs.md
Normal file
11
_content/cases/otc-irs.md
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
title: EUREX OTC IRS in C7 CAS
|
||||
goal: Integrate Over The Counter Interest Rate Swap including Calypso interface into C7 CAS
|
||||
role: Software developer helping with the integration
|
||||
date: Feb 2024 - Jun 2024
|
||||
z: 9
|
||||
draft: true
|
||||
---
|
||||
|
||||
|
||||
|
@ -14,6 +14,19 @@ export const getContent = (slug: string[]): GrayMatterFile<string> => {
|
||||
if (!contentMap[p]) {
|
||||
const file = fs.readFileSync(p, "utf8");
|
||||
const m = matter(file);
|
||||
const date = m.data.date;
|
||||
if (date) {
|
||||
m.data.date = "";
|
||||
const d = date.split("-");
|
||||
const from = d[0]?.trim();
|
||||
const to = d[1]?.trim();
|
||||
if (from) {
|
||||
m.data.date += new Date(from).toDateString()
|
||||
}
|
||||
if (to) {
|
||||
m.data.date += ` - ${new Date(to).toDateString()}`
|
||||
}
|
||||
}
|
||||
m.data.slug = `/c/${slug.join("/")}`;
|
||||
contentMap[p] = m;
|
||||
return m;
|
||||
|
Loading…
Reference in New Issue
Block a user