Last active
November 23, 2015 14:23
-
-
Save amk221/ac6245b882f4213b723d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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