[gnome-documents] view: avoid showing "4 weeks ago" or "12 months ago" as date strings
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] view: avoid showing "4 weeks ago" or "12 months ago" as date strings
- Date: Mon, 5 Mar 2012 22:23:21 +0000 (UTC)
commit 84a2a805ebe9eca30666da2dc9ad4a82759fc7a9
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Mar 5 12:56:57 2012 -0500
view: avoid showing "4 weeks ago" or "12 months ago" as date strings
Tweak the offsets we use to pick a string so that 4 weeks = last month
and 12 months = last year.
src/view.js | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/view.js b/src/view.js
index e4533b5..3ac5cc4 100644
--- a/src/view.js
+++ b/src/view.js
@@ -194,14 +194,14 @@ View.prototype = {
} else if (difference < 2 * DAY) {
dateRenderer.text = _("Yesterday");
} else if (difference < 7 * DAY) {
- dateRenderer.text = _("%s days ago").format(days.toString());
+ dateRenderer.text = _("%d days ago").format(days);
} else if (difference < 14 * DAY) {
dateRenderer.text = _("Last week");
- } else if (difference < 30 * DAY) {
- dateRenderer.text = _("%s weeks ago").format(weeks.toString());
+ } else if (difference < 28 * DAY) {
+ dateRenderer.text = _("%d weeks ago").format(weeks);
} else if (difference < 60 * DAY) {
dateRenderer.text = _("Last month");
- } else if (difference < 365 * DAY) {
+ } else if (difference < 360 * DAY) {
dateRenderer.text = _("%d months ago").format(months);
} else if (difference < 730 * DAY) {
dateRenderer.text = _("Last year");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]