mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-29 14:47:40 +00:00
Correct relative date handling of t=1s
We were incorrectly displaying “1 seconds ago”
This commit is contained in:
@@ -12,16 +12,18 @@ RelativeDate/Future/Days: <<period>> days from now
|
|||||||
RelativeDate/Future/Hours: <<period>> hours from now
|
RelativeDate/Future/Hours: <<period>> hours from now
|
||||||
RelativeDate/Future/Minutes: <<period>> minutes from now
|
RelativeDate/Future/Minutes: <<period>> minutes from now
|
||||||
RelativeDate/Future/Months: <<period>> months from now
|
RelativeDate/Future/Months: <<period>> months from now
|
||||||
|
RelativeDate/Future/Second: 1 second from now
|
||||||
RelativeDate/Future/Seconds: <<period>> seconds from now
|
RelativeDate/Future/Seconds: <<period>> seconds from now
|
||||||
RelativeDate/Future/Years: <<period>> years from now
|
RelativeDate/Future/Years: <<period>> years from now
|
||||||
RelativeDate/Past/Days: <<period>> days ago
|
RelativeDate/Past/Days: <<period>> days ago
|
||||||
RelativeDate/Past/Hours: <<period>> hours ago
|
RelativeDate/Past/Hours: <<period>> hours ago
|
||||||
RelativeDate/Past/Minutes: <<period>> minutes ago
|
RelativeDate/Past/Minutes: <<period>> minutes ago
|
||||||
RelativeDate/Past/Months: <<period>> months ago
|
RelativeDate/Past/Months: <<period>> months ago
|
||||||
|
RelativeDate/Past/Second: 1 second ago
|
||||||
RelativeDate/Past/Seconds: <<period>> seconds ago
|
RelativeDate/Past/Seconds: <<period>> seconds ago
|
||||||
RelativeDate/Past/Years: <<period>> years ago
|
RelativeDate/Past/Years: <<period>> years ago
|
||||||
SystemTiddler/Tooltip: This is a system tiddler
|
SystemTiddler/Tooltip: This is a system tiddler
|
||||||
TagManager/Tag/Heading: Tag
|
|
||||||
TagManager/Count/Heading: Count
|
|
||||||
TagManager/Colour/Heading: Colour
|
TagManager/Colour/Heading: Colour
|
||||||
|
TagManager/Count/Heading: Count
|
||||||
TagManager/Icon/Heading: Icon
|
TagManager/Icon/Heading: Icon
|
||||||
|
TagManager/Tag/Heading: Tag
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ exports.getRelativeDate = function(delta) {
|
|||||||
return {
|
return {
|
||||||
delta: delta,
|
delta: delta,
|
||||||
description: $tw.language.getString(
|
description: $tw.language.getString(
|
||||||
"RelativeDate/" + (futurep ? "Future" : "Past") + "/Seconds",
|
"RelativeDate/" + (futurep ? "Future" : "Past") + "/Second",
|
||||||
{variables:
|
{variables:
|
||||||
{period: "1"}
|
{period: "1"}
|
||||||
}
|
}
|
||||||
@@ -451,4 +451,21 @@ exports.makeTiddlerDictionary = function(data) {
|
|||||||
return output.join("\n");
|
return output.join("\n");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
High resolution microsecond timer for profiling
|
||||||
|
*/
|
||||||
|
exports.timer = function(base) {
|
||||||
|
var m;
|
||||||
|
if($tw.node) {
|
||||||
|
var r = process.hrtime();
|
||||||
|
m = r[0] * 1e3 + (r[1] / 1e6);
|
||||||
|
} else {
|
||||||
|
m = performance.now();
|
||||||
|
}
|
||||||
|
if(typeof base !== "undefined") {
|
||||||
|
m = m - base;
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user