From 714e61b1377262c647b1ddf3a6f3e345216a6214 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 1 Jan 2014 15:31:27 -0500 Subject: [PATCH 1/3] upping markdown minver --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c13dbd78eb..16ff37e67c 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "uglify-js": "~2.4.0", "validator": "~1.5.1", "nodebb-plugin-mentions": "~0.1.16", - "nodebb-plugin-markdown": "~0.2.1", + "nodebb-plugin-markdown": "~0.3.0", "nodebb-theme-vanilla": "~0.0.12", "nodebb-theme-cerulean": "0.0.10", "cron": "~1.0.1", From e3185b9560775dbcb3d55e852417f9ef127e94f2 Mon Sep 17 00:00:00 2001 From: cmastudios Date: Wed, 1 Jan 2014 19:46:11 -0500 Subject: [PATCH 2/3] Calculate age based on days instead of years Calculating the age based on the year only caused issues in the display of the age because it was off. Example: Person who was born in march of 1999 is displayed as 15 instead of 14 after the turn of the year. --- src/routes/user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/user.js b/src/routes/user.js index dd5491b43e..144cf08508 100644 --- a/src/routes/user.js +++ b/src/routes/user.js @@ -539,7 +539,7 @@ var fs = require('fs'), if (!data.birthday) { data.age = ''; } else { - data.age = new Date().getFullYear() - new Date(data.birthday).getFullYear(); + data.age = Math.floor((new Date().getTime() - new Date(data.birthday).getTime()) / 31536000000); } function canSeeEmail() { @@ -581,4 +581,4 @@ var fs = require('fs'), }; -}(exports)); \ No newline at end of file +}(exports)); From 095e5527e3dff23cd206c5e7af5495ce7e51c91d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 2 Jan 2014 02:17:47 -0500 Subject: [PATCH 3/3] upping markdown minver --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 16ff37e67c..fe7a2aff80 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "uglify-js": "~2.4.0", "validator": "~1.5.1", "nodebb-plugin-mentions": "~0.1.16", - "nodebb-plugin-markdown": "~0.3.0", + "nodebb-plugin-markdown": "~0.3.1", "nodebb-theme-vanilla": "~0.0.12", "nodebb-theme-cerulean": "0.0.10", "cron": "~1.0.1",