Skip to content

Instantly share code, notes, and snippets.

@amk221
Last active November 23, 2015 14:23
Show Gist options
  • Save amk221/ac6245b882f4213b723d to your computer and use it in GitHub Desktop.
Save amk221/ac6245b882f4213b723d to your computer and use it in GitHub Desktop.
import computed from 'ember-computed';
export function birthDateStrFor(key) {
return computed(key, function() {
let user = this.get(key);
let format = this.get('locale.dateFormat');
let name = user.get('name');
let dob = user.get('dob').format(format);
return `${name}'s birthday is on ${dob}`;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment