Permalink
Browse files

fixing date parsing

  • Loading branch information...
1 parent b68b6ad commit 03f5027537c7dd5a2de8307078bdb355c8e05304 @selfcontained committed Apr 16, 2012
Showing with 3 additions and 4 deletions.
  1. +1 −1 README.md
  2. +1 −1 articles/makdown-powered-blogs/article.json
  3. +1 −1 blog/article.js
  4. +0 −1 blog/blog.js
View
@@ -52,7 +52,7 @@ The properties should be pretty self-explanatory.
+ ```author``` maps to the config file in ```config/authors.json```, which is where meta-deta about the author is stored.
+ ```publish``` can be true/false. If false, they won't be available or generated for the site.
-+ ```date``` should be formatted as ```YYYY-MM-DD HH:mm:ss``` ( this will be more flexible shortly, I was lazy )
++ ```date``` should be formatted as a string Date.parse can handle correctly
##Theme
@@ -1,7 +1,7 @@
{
"title" : "markdown powered blogs",
"author" : "bradharris",
- "date" : "2012-04-14 09:00:00",
+ "date" : "4/14/2012 12:00 PM",
"publish" : true,
"tags" : [
"markdown",
View
@@ -15,7 +15,7 @@ var path = require('path'),
var Article = module.exports = function(config) {
- var date = moment(config.date, 'YYYY-MM-DD');
+ var date = moment(Date.parse(config.date));
this.author = config.author;
this.title = config.title;
View
@@ -31,7 +31,6 @@ Blog.prototype = {
this.app = express.createServer();
this.app.configure(function(){
- console.log(self.config);
self.app.set('views', config.templates);
self.app.set('view engine', config.view_engine);
self.app.set('view options', config.view_options);

0 comments on commit 03f5027

Please sign in to comment.