Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Here is a horizontal rule:
This is a block quote with lots of text. This is a block quote with lots of text. This is a block quote with lots of text. This is a block quote with lots of text. This is a block quote with lots of text. This is a block quote with lots of text. This is a block quote with lots of text. This is a block quote with lots of text.
Here are some bullets:
- Bullet 1
- Bullet 2
- Bullet 3
- Bullet 4
And some numbers:
- This is a thing
- This is another thing
- This is a third thing
- This is a fourth thing with a link
Here’s an image:
And a table:
Column 1 | Column 2 | Column 3 |
---|---|---|
Text | Text | Text |
And finally. some code:
function timeLabel(date, short) {
if (typeof date === "undefined" || date === "0000-00-00T00:00:00Z" || date === "0000-00-00T00:00:00.000Z" || date === "0000-00-00" || date === null) {
return "never";
}
var seconds = Math.floor((new Date() - Date.parse(date)) / 1000);
var prefix = (!short && seconds < 0 ? "in " : "");
var suffix = (!short && seconds >= 0 ? " ago" : "");
seconds = Math.abs(seconds);
var interval = Math.floor(seconds / 31536000);
if (interval > 1) {
return prefix + interval + (short ? " years" : " years") + suffix;
}
interval = Math.floor(seconds / 2592000);
if (interval > 1) {
return prefix + interval + (short ? " months" : " months") + suffix;
}
interval = Math.floor(seconds / 86400);
if (interval > 1) {
return prefix + interval + (short ? " days" : " days") + suffix;
}
interval = Math.floor(seconds / 3600);
if (interval > 1) {
return prefix + interval + (short ? " hrs" : " hours") + suffix;
}
interval = Math.floor(seconds / 60);
if (interval > 1) {
return prefix + interval + (short ? " mins" : " minutes") + suffix;
}
return prefix + Math.floor(seconds) + (short ? " secs" : " seconds") + suffix;
};