should be v1.0.5, but version isn't right; styling; new domain; new contact form
This commit is contained in:
parent
e9cd5c734e
commit
a9de455c71
1 changed files with 21 additions and 0 deletions
21
src/_data/buildInfo.js
Normal file
21
src/_data/buildInfo.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
const packageJson = require('../../package.json');
|
||||
|
||||
module.exports = () => {
|
||||
const now = new Date();
|
||||
const { timeZone } = Intl.DateTimeFormat().resolvedOptions();
|
||||
const buildDate = Intl.DateTimeFormat('fr-CA', {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
}).format(now);
|
||||
const buildTime = Intl.DateTimeFormat('nl-NL', { hour: '2-digit', minute: '2-digit' }).format(
|
||||
now,
|
||||
);
|
||||
return {
|
||||
version: packageJson.version,
|
||||
time: {
|
||||
raw: now.toISOString(),
|
||||
formatted: `${buildDate} ${buildTime} ${timeZone}`,
|
||||
},
|
||||
};
|
||||
};
|
||||
Loading…
Reference in a new issue