4

Current date

I am using the telescope app. Currently in my post title template I am using scheduledAt to show a date when an event will be. I would like to shorten the date to just Thu May 07 2015 but I don't really know how to go about doing this.

Cristik
  • 30,989
  • 25
  • 91
  • 127

1 Answers1

4

In Telescope, there's a helper named formatDate specifically designed for that purpose, just call it in your template like this :

{{formatDate scheduledAt "ddd MMMM DD YYYY"}}

Under the hood, it's using momentjs to display the date object.

http://momentjs.com/docs/#/displaying/

saimeunt
  • 22,666
  • 2
  • 56
  • 61