Add moment.js support
This commit is contained in:
		
							parent
							
								
									f8d75d821f
								
							
						
					
					
						commit
						c886a51b7d
					
				
					 6 changed files with 27 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -1,8 +1,9 @@
 | 
			
		|||
import Ember from 'ember';
 | 
			
		||||
import { formatDate } from '../utils/date-helpers';
 | 
			
		||||
 | 
			
		||||
export default Ember.Handlebars.makeBoundHelper(function(value, options) {
 | 
			
		||||
export default Ember.Handlebars.makeBoundHelper(function(value, format) {
 | 
			
		||||
  if (value == null) {
 | 
			
		||||
    return 'N/A';
 | 
			
		||||
  }
 | 
			
		||||
  return value;
 | 
			
		||||
  return formatDate(value, format);
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue