* Some code cleanup

This commit is contained in:
Bryan Ashby 2015-07-23 10:07:56 -06:00
parent 4505ad17e2
commit 7f4c97329d
2 changed files with 4 additions and 29 deletions

View File

@ -130,14 +130,14 @@ function connectEntry(client) {
//
displayBanner(term);
/* var art1 = require('fs').readFileSync('/home/nuskooler/dev/enigma-bbs/mods/themes/NU-MAYA/APPLY1.ANS');
/*
var art1 = require('fs').readFileSync('/home/nuskooler/dev/enigma-bbs/mods/themes/NU-MAYA/APPLY1.ANS');
term.rawWrite(art1);
term.write(ansi.resetScreen());
theme.displayThemeArt({client : client, name : 'APPLY1.ANS'}, function onArt() {
});
*/
*/
setTimeout(function onTimeout() {
client.gotoMenuModule( { name : Config.firstMenu });
}, 500);

View File

@ -320,35 +320,10 @@ User.prototype.persistProperties = function(cb) {
});
};
// :TODO: A general purpose date/time formatting class or lib would be better here....
User.prototype.getFormattedBirthDate = function(style) {
style = style || 'medium';
switch(style) {
case 'medium' :
return _.has(this.properties, 'birthdate') ?
new Date(Date.parse(this.properties.birthdate)).toJSON().slice(0, 10) :
null;
}
};
User.prototype.getAge = function() {
if(_.has(this.properties, 'birthdate')) {
return moment().diff(this.properties.birthdate, 'years');
}
/*
if(!isNaN(birthDate)) {
var today = new Date();
var age = today.getFullYear() - birthDate.getFullYear();
var m = today.getMonth() - birthDate.getMonth();
if(m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
return age;
}
*/
};
///////////////////////////////////////////////////////////////////////////////