These are chat archives for jescalan/roots

22nd
Mar 2016
andrewgrano
@andrewgrano
Mar 22 2016 05:29
how would you convert a date like this "2016-03-17T05:41:21+00:00" (coming from my wordpress post JSON) to something like "03 17 2015" or "March 17, 2016" ?
Jeff Escalante
@jescalan
Mar 22 2016 14:19
@andrewgrano moment.js
you can do it manually with js date parsing, but moment is much easier if you are doing a few different dates
markerx
@markerx
Mar 22 2016 16:18
@jenius I see that your employer is also a contributor to Serverless. Are you guys moving more in that direction, as opposed to say Netlify? Are you using Roots with Serverless?
Mathias Biilmann
@biilmann
Mar 22 2016 16:52
@markerx why would you see serverless as something different than netlify?
things like http://serverlessconf.io/ are built with netlify, even :)
markerx
@markerx
Mar 22 2016 16:53
@biilmann I was referring to https://github.com/serverless/serverless specifically, which uses 100% AWS resources.
andrewgrano
@andrewgrano
Mar 22 2016 17:24

@jenius - i thought moment.js was the correct approach! but i tried to implement it and got an error, "undefined is not a function". My package.json is correct (moment": "^2.12.0" ) and my app.coffee seems correct:
moment = require 'moment'
jade:
pretty: true
moment: moment

the _singlepost.jade looks like this:

p= moment(post.date).format("YYYY/MM/DD")

and thats whats throwing the error.
Any ideas what I'm missing?? Thanks again!