misc style updates
This commit is contained in:
@ -8,6 +8,9 @@
|
||||
let pDate = new Date(date);
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{title}</title>
|
||||
</svelte:head>
|
||||
|
||||
<div id="post">
|
||||
<h1>{title}</h1>
|
||||
|
23
src/lib/datefmt.js
Normal file
23
src/lib/datefmt.js
Normal file
@ -0,0 +1,23 @@
|
||||
const months = [
|
||||
'January', 'February', 'March', 'April', 'May', 'June',
|
||||
'July', 'August', 'September', 'October', 'November', 'December'
|
||||
];
|
||||
|
||||
const ordinals = [
|
||||
'first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh',
|
||||
'eighth', 'ninth', 'tenth', 'eleventh', 'twelfth', 'thirteenth',
|
||||
'fourteenth', 'fifteenth', 'sixteenth', 'seventeenth', 'eighteenth',
|
||||
'nineteenth', 'twentieth', 'twenty-first', 'twenty-second', 'twenty-third',
|
||||
'twenty-fourth', 'twenty-fifth', 'twenty-sixth', 'twenty-seventh',
|
||||
'twenty-eighth', 'twenty-ninth', 'thirtieth', 'thirty-first'
|
||||
];
|
||||
|
||||
const weekdays = [
|
||||
'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'
|
||||
];
|
||||
|
||||
|
||||
export function formatDate(datestr) {
|
||||
const date = new Date(datestr);
|
||||
const w = date.get
|
||||
}
|
Reference in New Issue
Block a user