Sourcecode in Site/macros.js:
1: function monthlist_macro(param) {
2: if (!this.stories.size() || !this.preferences.getProperty("archive"))
3: return;
4: var size = param.limit ? Math.min(this.size(), param.limit) : this.size();
5: for (var i=0;i<size;i++) {
6: var curr = this.get(i);
7: var next = this.get(i+1);
8: if (!next || next.groupname.substring(0, 6) < curr.groupname.substring(0, 6)) {
9: res.write(param.itemprefix);
10: Html.openLink({href: curr.href()});
11: var ts = curr.groupname.substring(0, 6).toDate("yyyyMM", this.getTimeZone());
12: res.write(formatTimestamp(ts, param.format ? param.format : "MMMM yyyy"));
13: Html.closeLink();
14: res.write(param.itemsuffix);
15: }
16: }
17: return;
18: }
|