cms/app-client/app/helpers/short-date.js
author ymh <ymh.work@gmail.com>
Sat, 06 Aug 2016 21:29:33 +0700
changeset 261 02e2396bcbbc
parent 210 08ad36c693b1
permissions -rw-r--r--
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)

import Ember from 'ember';

export function shortDate(params) {
	if(params[0]) {
		return params[0].getDate() + '-' + ( params[0].getMonth() + 1 ) + '-' + params[0].getFullYear();
	}
}

export default Ember.Helper.helper(shortDate);