Date formatting

pull/1/head
Oliver Kennedy 2015-12-15 09:57:21 -05:00
parent ce85ca14b4
commit fc5e203ba3
4 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,13 @@
/**
* Config
*/
process.env.TZ = 'America/New_York'
/**
* Modules
*/
var extname = require('path').extname;
var Metalsmith = require('metalsmith');
var drafts = require('metalsmith-drafts');

5
helpers/formatDate.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = function(d) {
// return d;
// return new Date("2015-12-15");
return ""+d.getUTCMonth()+"/"+d.getUTCDate()+"/"+d.getUTCFullYear()
}

View File

@ -22,10 +22,10 @@
</div>
<h1 class="title">{{title}}</h1>
<h2 class="byline">
{{formatDate date}}
{{#if author}}
{{{author}}} at
by {{{author}}}
{{/if}}
{{date}}
</h2>
{{{contents}}}
</div>

View File

@ -1,5 +1,6 @@
---
title: CSE 662 Demo Day
author: Oliver Kennedy
---
I'd like to give a shout out to the students in CSE-662 and CSE-749 for a fantastic demo day. Luke, Karthik, and I have been receiving tons of positive feedback about your energy, enthusiasm, and the general awesomeness of what you did. I hope y'all had as much fun with it as we did.