-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[ | ||
{ | ||
"author": "linonetwo", | ||
"dependents": "", | ||
"description": "Filters for getting week range and preparing visualization data.", | ||
"list": "readme", | ||
"name": "date-filters", | ||
"plugin-type": "plugin", | ||
"text": "{\"tiddlers\":{\"$:/plugins/linonetwo/date-filters/readme\":{\"title\":\"$:/plugins/linonetwo/date-filters/readme\",\"type\":\"text/vnd.tiddlywiki\",\"text\":\"! date-filters\\n\\nFilters for getting week range and preparing visualization data.\\n\\n// TODO: use https://talk.tiddlywiki.org/t/introducing-the-testcase-widget/9847/19 after 5.3.4 release\\n\\n!! Macros\\n\\n<$macrocall $name=\\\".example\\\" n=\\\"m1\\\" eg=\\\"\\\"\\\"<<weekstart>>\\\"\\\"\\\"/>\\n\\n<$macrocall $name=\\\".example\\\" n=\\\"m2\\\" eg=\\\"\\\"\\\"<<weekend>>\\\"\\\"\\\"/>\\n\\n<$macrocall $name=\\\".example\\\" n=\\\"m3\\\" eg=\\\"\\\"\\\"<<montosun>>\\\"\\\"\\\"/>\\n\\n!! Filter Operators\\n\\n<<.operator-example f1 \\\"[[CountUpDayExampleTiddler]daysbetween[]]\\\">>\\n\\n<<.operator-example f1.5 \\\"[[CountUpDayExampleTiddler]hoursbetween[]]\\\">>\\n\\n<<.operator-example f2 \\\"[weekstart[]]\\\">>\\n\\n<<.operator-example f2.5 \\\"[<weekstart>]\\\">>\\n\\n<<.operator-example f3 \\\"[weekend[]]\\\">>\\n\\n<<.operator-example f3.5 \\\"[<weekend>] [<now [UTC]YYYY0MM0DD0hh0mm0ssXXX>]\\\">>\\n\\n<<.operator-example f4 \\\"[all[tiddlers]!is[system]field:calendarEntry[yes]tag[Sleeping]]\\\">>\\n\\n<<.operator-example f4.1 \\\"[all[tiddlers]!is[system]field:calendarEntry[yes]tag[Sleeping]] :filter[get[startDate]compare:date:gteq<weekstart>compare:date:lteq<now [UTC]YYYY0MM0DD0hh0mm0ssXXX>]\\\">>\\n\\n<<.operator-example f4.2 \\\"[all[tiddlers]!is[system]field:calendarEntry[yes]tag[Sleeping]] :filter[get[startDate]compare:date:gteq<weekstart>compare:date:lteq<now [UTC]YYYY0MM0DD0hh0mm0ssXXX>] +[counthours[]]\\\">>\\n\\n<<.operator-example f5 \\\"[daystart[0],[7]] [dayend[0],[7]]\\\">>\\n\\n<<.operator-example f6 \\\"[weekstart[]addweekday[]] [weekstart[]addweekday[4]]\\\">>\\n\"},\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/addweekday.js\":{\"title\":\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/addweekday.js\",\"type\":\"application/javascript\",\"module-type\":\"filteroperator\",\"Modern.TiddlyDev#Origin\":\"filter/addweekday.ts\",\"text\":\"\\\"use strict\\\";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(t,r,o,_)=>{if(r&&\\\"object\\\"==typeof r||\\\"function\\\"==typeof r)for(let e of __getOwnPropNames(r))__hasOwnProp.call(t,e)||e===o||__defProp(t,e,{get:()=>r[e],enumerable:!(_=__getOwnPropDesc(r,e))||_.enumerable});return t},__toCommonJS=e=>__copyProps(__defProp({},\\\"__esModule\\\",{value:!0}),e),addweekday_exports={},addweekday=(__export(addweekday_exports,{addweekday:()=>addweekday}),module.exports=__toCommonJS(addweekday_exports),(e,t)=>{const o=[];var r=Number(t.operand);const _=\\\"\\\"!==t.operand&&Number.isInteger(r)?r:(new Date).getDay();return e(function(e,t){var r=$tw.utils.parseDate(t);r&&(r=r.getTime()+864e5*(_-1),r=$tw.utils.stringifyDate(new Date(r)),o.push(r))}),o});\"},\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/countdaysappear.js\":{\"title\":\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/countdaysappear.js\",\"type\":\"application/javascript\",\"module-type\":\"filteroperator\",\"Modern.TiddlyDev#Origin\":\"filter/countdaysappear.ts\",\"text\":\"\\\"use strict\\\";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(t,r,a,n)=>{if(r&&\\\"object\\\"==typeof r||\\\"function\\\"==typeof r)for(let e of __getOwnPropNames(r))__hasOwnProp.call(t,e)||e===a||__defProp(t,e,{get:()=>r[e],enumerable:!(n=__getOwnPropDesc(r,e))||n.enumerable});return t},__toCommonJS=e=>__copyProps(__defProp({},\\\"__esModule\\\",{value:!0}),e),countdaysappear_exports={};function getMidpointDate(e,t){var r,a;return null===e||null===t?null:(r=e.getTime(),a=t.getTime(),new Date((r+a)/2))}function countUniqueDays(e){const r=new Set;return e.forEach(e=>{var t=e.toISOString().split(\\\"T\\\")[0];r.add(t)}),r.size}__export(countdaysappear_exports,{countdaysappear:()=>countdaysappear}),module.exports=__toCommonJS(countdaysappear_exports);var countdaysappear=(e,t)=>{const o=[];return e(function(e,t){let r=null;var a,n;null!=e&&e.fields.startDate&&e.fields.endDate&&(n=$tw.utils.parseDate(e.fields.startDate),a=$tw.utils.parseDate(e.fields.endDate),r=getMidpointDate(a,n)),null===r&&null!=e&&e.fields.startDate&&(a=$tw.utils.parseDate(e.fields.startDate),r=a),null===r&&null!=e&&e.fields.endDate&&(n=$tw.utils.parseDate(e.fields.endDate),r=n),null!==r&&o.push(r)}),[countUniqueDays(o).toString()]};\"},\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/counthours.js\":{\"title\":\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/counthours.js\",\"type\":\"application/javascript\",\"module-type\":\"filteroperator\",\"Modern.TiddlyDev#Origin\":\"filter/counthours.ts\",\"text\":\"\\\"use strict\\\";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var o in t)__defProp(e,o,{get:t[o],enumerable:!0})},__copyProps=(t,o,r,n)=>{if(o&&\\\"object\\\"==typeof o||\\\"function\\\"==typeof o)for(let e of __getOwnPropNames(o))__hasOwnProp.call(t,e)||e===r||__defProp(t,e,{get:()=>o[e],enumerable:!(n=__getOwnPropDesc(o,e))||n.enumerable});return t},__toCommonJS=e=>__copyProps(__defProp({},\\\"__esModule\\\",{value:!0}),e),counthours_exports={};function getDiffInHours(e,t){return(e.getTime()-t.getTime())/36e5}__export(counthours_exports,{counthours:()=>counthours}),module.exports=__toCommonJS(counthours_exports);var counthours=(e,t)=>{let n=0;return e(function(e,t){var o,r;null!=e&&e.fields.startDate&&e.fields.endDate&&(o=$tw.utils.parseDate(e.fields.startDate),r=$tw.utils.parseDate(e.fields.endDate),null!==o)&&null!==r&&(r=getDiffInHours(r,o),n+=r)}),[n.toFixed(2)]};\"},\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/dayend.js\":{\"title\":\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/dayend.js\",\"type\":\"application/javascript\",\"module-type\":\"filteroperator\",\"Modern.TiddlyDev#Origin\":\"filter/dayend.ts\",\"text\":\"\\\"use strict\\\";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(t,r,o,a)=>{if(r&&\\\"object\\\"==typeof r||\\\"function\\\"==typeof r)for(let e of __getOwnPropNames(r))__hasOwnProp.call(t,e)||e===o||__defProp(t,e,{get:()=>r[e],enumerable:!(a=__getOwnPropDesc(r,e))||a.enumerable});return t},__toCommonJS=e=>__copyProps(__defProp({},\\\"__esModule\\\",{value:!0}),e),dayend_exports={};function getStartDateOfWeek(e=0){var t=new Date,r=(t.getDay()||7)-1+7*e;return t.setDate(t.getDate()-r),t.setHours(0,0,0,0),t}function getEndDateOfWeek(e=0){var t=getStartDateOfWeek(e),r=new Date(t);return r.setDate(t.getDate()+6),r.setHours(23,59,59,999),r}__export(dayend_exports,{dayend:()=>dayend}),module.exports=__toCommonJS(dayend_exports);var dayend=(e,t)=>{let r=Number(t.operands[0]||0),o=(Number.isNaN(r)&&(r=0),Number(t.operands[1]||1));Number.isNaN(o)&&(o=1);var a=getEndDateOfWeek(r).getTime()-24*(7-o)*60*60*1e3,a=new Date(a);return[$tw.utils.formatDateString(a,\\\"[UTC]YYYY0MM0DD0hh0mm0ss0XXX\\\")]};\"},\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/daysbetween.js\":{\"title\":\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/daysbetween.js\",\"type\":\"application/javascript\",\"module-type\":\"filteroperator\",\"Modern.TiddlyDev#Origin\":\"filter/daysbetween.ts\",\"text\":\"\\\"use strict\\\";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(t,r,o,a)=>{if(r&&\\\"object\\\"==typeof r||\\\"function\\\"==typeof r)for(let e of __getOwnPropNames(r))__hasOwnProp.call(t,e)||e===o||__defProp(t,e,{get:()=>r[e],enumerable:!(a=__getOwnPropDesc(r,e))||a.enumerable});return t},__toCommonJS=e=>__copyProps(__defProp({},\\\"__esModule\\\",{value:!0}),e),daysbetween_exports={};function getDateToCompareFromTiddler(t,e){if(e){let e=null;if(null!==(e=null===(e=t.fields.endDate&&(r=$tw.utils.parseDate(t.fields.endDate))?r:e)&&t.fields.startDate&&(r=$tw.utils.parseDate(t.fields.startDate))?r:e))return e}else{let e=null;var r;if(null!==(e=null===(e=t.fields.startDate&&(r=$tw.utils.parseDate(t.fields.startDate))?r:e)&&t.fields.endDate&&(r=$tw.utils.parseDate(t.fields.endDate))?r:e))return e}}function getDiffInDays(e,t){var r=e.getTime()-t.getTime();return Math.round(r/864e5)}function getDateToCompareOrTodayFromOperand(e){let t=null;return t=null===(t=e?$tw.utils.parseDate(e):t)?new Date:t}__export(daysbetween_exports,{daysbetween:()=>daysbetween}),module.exports=__toCommonJS(daysbetween_exports);var daysbetween=(e,t)=>{const o=\\\"!\\\"!==t.prefix,a=getDateToCompareOrTodayFromOperand(t.operands[0]),n=[];return e(function(e,t){var r;e&&(void 0===(r=getDateToCompareFromTiddler(e,o))?n.push(\\\"\\\"):(r=o?getDiffInDays(a,r):getDiffInDays(r,a),n.push(String(r))))}),n};\"},\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/daystart.js\":{\"title\":\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/daystart.js\",\"type\":\"application/javascript\",\"module-type\":\"filteroperator\",\"Modern.TiddlyDev#Origin\":\"filter/daystart.ts\",\"text\":\"\\\"use strict\\\";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(t,r,o,a)=>{if(r&&\\\"object\\\"==typeof r||\\\"function\\\"==typeof r)for(let e of __getOwnPropNames(r))__hasOwnProp.call(t,e)||e===o||__defProp(t,e,{get:()=>r[e],enumerable:!(a=__getOwnPropDesc(r,e))||a.enumerable});return t},__toCommonJS=e=>__copyProps(__defProp({},\\\"__esModule\\\",{value:!0}),e),daystart_exports={};function getStartDateOfWeek(e=0){var t=new Date,r=(t.getDay()||7)-1+7*e;return t.setDate(t.getDate()-r),t.setHours(0,0,0,0),t}__export(daystart_exports,{daystart:()=>daystart}),module.exports=__toCommonJS(daystart_exports);var daystart=(e,t)=>{let r=Number(t.operands[0]||0),o=(Number.isNaN(r)&&(r=0),Number(t.operands[1]||1));Number.isNaN(o)&&(o=1);var a=getStartDateOfWeek(r).getTime()+24*(o-1)*60*60*1e3,a=new Date(a);return[$tw.utils.formatDateString(a,\\\"[UTC]YYYY0MM0DD0hh0mm0ss0XXX\\\")]};\"},\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/hoursbetween.js\":{\"title\":\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/hoursbetween.js\",\"type\":\"application/javascript\",\"module-type\":\"filteroperator\",\"Modern.TiddlyDev#Origin\":\"filter/hoursbetween.ts\",\"text\":\"\\\"use strict\\\";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(t,r,o,n)=>{if(r&&\\\"object\\\"==typeof r||\\\"function\\\"==typeof r)for(let e of __getOwnPropNames(r))__hasOwnProp.call(t,e)||e===o||__defProp(t,e,{get:()=>r[e],enumerable:!(n=__getOwnPropDesc(r,e))||n.enumerable});return t},__toCommonJS=e=>__copyProps(__defProp({},\\\"__esModule\\\",{value:!0}),e),hoursbetween_exports={};function getDateToCompareFromTiddler(t,e){if(e){let e=null;if(null!==(e=null===(e=t.fields.endDate&&(r=$tw.utils.parseDate(t.fields.endDate))?r:e)&&t.fields.startDate&&(r=$tw.utils.parseDate(t.fields.startDate))?r:e))return e}else{let e=null;var r;if(null!==(e=null===(e=t.fields.startDate&&(r=$tw.utils.parseDate(t.fields.startDate))?r:e)&&t.fields.endDate&&(r=$tw.utils.parseDate(t.fields.endDate))?r:e))return e}}function getDiffInHours(e,t){return(e.getTime()-t.getTime())/36e5}function getDateToCompareOrTodayFromOperand(e){let t=null;return t=null===(t=e?$tw.utils.parseDate(e):t)?new Date:t}__export(hoursbetween_exports,{hoursbetween:()=>hoursbetween}),module.exports=__toCommonJS(hoursbetween_exports);var hoursbetween=(e,t)=>{const o=\\\"!\\\"!==t.prefix,n=getDateToCompareOrTodayFromOperand(t.operands[0]),s=[];return e(function(e,t){var r;e&&(void 0===(r=getDateToCompareFromTiddler(e,o))?s.push(\\\"\\\"):(r=o?getDiffInHours(n,r):getDiffInHours(r,n),s.push(r.toFixed(2))))}),s};\"},\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/notHaveGroupTag.js\":{\"title\":\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/notHaveGroupTag.js\",\"type\":\"application/javascript\",\"module-type\":\"filteroperator\",\"Modern.TiddlyDev#Origin\":\"filter/notHaveGroupTag.ts\",\"text\":\"\\\"use strict\\\";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var o in t)__defProp(e,o,{get:t[o],enumerable:!0})},__copyProps=(t,o,r,a)=>{if(o&&\\\"object\\\"==typeof o||\\\"function\\\"==typeof o)for(let e of __getOwnPropNames(o))__hasOwnProp.call(t,e)||e===r||__defProp(t,e,{get:()=>o[e],enumerable:!(a=__getOwnPropDesc(o,e))||a.enumerable});return t},__toCommonJS=e=>__copyProps(__defProp({},\\\"__esModule\\\",{value:!0}),e),notHaveGroupTag_exports={},notHaveGroupTag=(__export(notHaveGroupTag_exports,{notHaveGroupTag:()=>notHaveGroupTag}),module.exports=__toCommonJS(notHaveGroupTag_exports),(e,t)=>{const r=[],a=$tw.wiki.getTiddlerText(\\\"$:/plugins/linonetwo/visualization-dashboard/tags/gauge-meta-tag\\\"),n=$tw.wiki.getTiddlerText(\\\"$:/plugins/linonetwo/visualization-dashboard/tags/gauge-template-group-meta-tag\\\");return a&&n&&e(function(e,t){var o;!e||0!==(o=e.fields.tags.filter(e=>e!==a).flatMap(e=>{var t;return null!=(t=null==(t=null==(t=$tw.wiki.getTiddler(e))?void 0:t.fields)?void 0:t.tags)?t:[]})).length&&o.includes(n)||r.push(t)}),r});\"},\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/weekend.js\":{\"title\":\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/weekend.js\",\"type\":\"application/javascript\",\"module-type\":\"filteroperator\",\"Modern.TiddlyDev#Origin\":\"filter/weekend.ts\",\"text\":\"\\\"use strict\\\";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(t,r,o,n)=>{if(r&&\\\"object\\\"==typeof r||\\\"function\\\"==typeof r)for(let e of __getOwnPropNames(r))__hasOwnProp.call(t,e)||e===o||__defProp(t,e,{get:()=>r[e],enumerable:!(n=__getOwnPropDesc(r,e))||n.enumerable});return t},__toCommonJS=e=>__copyProps(__defProp({},\\\"__esModule\\\",{value:!0}),e),weekend_exports={};function getStartDateOfWeek(e=0){var t=new Date,r=(t.getDay()||7)-1+7*e;return t.setDate(t.getDate()-r),t.setHours(0,0,0,0),t}function getEndDateOfWeek(e=0){var t=getStartDateOfWeek(e),r=new Date(t);return r.setDate(t.getDate()+6),r.setHours(23,59,59,999),r}__export(weekend_exports,{weekend:()=>weekend}),module.exports=__toCommonJS(weekend_exports);var weekend=(e,t)=>{let r=Number(t.operand||0);return Number.isNaN(r)&&(r=0),[$tw.utils.formatDateString(getEndDateOfWeek(r),\\\"[UTC]YYYY0MM0DD0hh0mm0ss0XXX\\\")]};\"},\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/weekstart.js\":{\"title\":\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/filter/weekstart.js\",\"type\":\"application/javascript\",\"module-type\":\"filteroperator\",\"Modern.TiddlyDev#Origin\":\"filter/weekstart.ts\",\"text\":\"\\\"use strict\\\";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(t,r,o,_)=>{if(r&&\\\"object\\\"==typeof r||\\\"function\\\"==typeof r)for(let e of __getOwnPropNames(r))__hasOwnProp.call(t,e)||e===o||__defProp(t,e,{get:()=>r[e],enumerable:!(_=__getOwnPropDesc(r,e))||_.enumerable});return t},__toCommonJS=e=>__copyProps(__defProp({},\\\"__esModule\\\",{value:!0}),e),weekstart_exports={};function getStartDateOfWeek(e=0){var t=new Date,r=(t.getDay()||7)-1+7*e;return t.setDate(t.getDate()-r),t.setHours(0,0,0,0),t}__export(weekstart_exports,{weekstart:()=>weekstart}),module.exports=__toCommonJS(weekstart_exports);var weekstart=(e,t)=>{let r=Number(t.operand||0);return Number.isNaN(r)&&(r=0),[$tw.utils.formatDateString(getStartDateOfWeek(r),\\\"[UTC]YYYY0MM0DD0hh0mm0ss0XXX\\\")]};\"},\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/macro/montosun.js\":{\"title\":\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/macro/montosun.js\",\"type\":\"application/javascript\",\"module-type\":\"macro\",\"Modern.TiddlyDev#Origin\":\"macro/montosun.ts\",\"text\":\"\\\"use strict\\\";exports.name=\\\"montosun\\\",exports.params=[],exports.run=()=>{var e;return\\\"en-GB\\\"===(null==(e=null==(e=$tw.wiki.getTiddler($tw.wiki.getTiddlerText(\\\"$:/language\\\",\\\"en-GB\\\")))?void 0:e.fields)?void 0:e.name)?\\\"['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']\\\":\\\"['一', '二', '三', '四', '五', '六', '日']\\\"};\"},\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/macro/weekend.js\":{\"title\":\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/macro/weekend.js\",\"type\":\"application/javascript\",\"module-type\":\"macro\",\"Modern.TiddlyDev#Origin\":\"macro/weekend.ts\",\"text\":\"\\\"use strict\\\";function getStartDateOfWeek(e=0){var t=new Date,a=(t.getDay()||7)-1+7*e;return t.setDate(t.getDate()-a),t.setHours(0,0,0,0),t}function getEndDateOfWeek(e=0){var t=getStartDateOfWeek(e),a=new Date(t);return a.setDate(t.getDate()+6),a.setHours(23,59,59,999),a}exports.name=\\\"weekend\\\",exports.params=[{name:\\\"offset\\\",\\\"default\\\":\\\"\\\"}],exports.run=e=>{let t=Number(e||0);return Number.isNaN(t)&&(t=0),$tw.utils.formatDateString(getEndDateOfWeek(t),\\\"[UTC]YYYY0MM0DD0hh0mm0ss0XXX\\\")};\"},\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/macro/weekstart.js\":{\"title\":\"$:/plugins/linonetwo/visualization-dashboard/tiddlywiki-ui/macro/weekstart.js\",\"type\":\"application/javascript\",\"module-type\":\"macro\",\"Modern.TiddlyDev#Origin\":\"macro/weekstart.ts\",\"text\":\"\\\"use strict\\\";function getStartDateOfWeek(t=0){var e=new Date,r=(e.getDay()||7)-1+7*t;return e.setDate(e.getDate()-r),e.setHours(0,0,0,0),e}exports.name=\\\"weekstart\\\",exports.params=[{name:\\\"offset\\\",\\\"default\\\":\\\"\\\"}],exports.run=t=>{let e=Number(t||0);return Number.isNaN(e)&&(e=0),$tw.utils.formatDateString(getStartDateOfWeek(e),\\\"[UTC]YYYY0MM0DD0hh0mm0ss0XXX\\\")};\"}}}", | ||
"title": "$:/plugins/linonetwo/date-filters", | ||
"type": "application/json", | ||
"version": "1.1.0", | ||
"Modern.TiddlyDev#SHA256-Hashed": "e3d250b70985ab7145db9640e697bde19e64b5cba63e64f28c21c6bafbfaf90b" | ||
} | ||
] |
Oops, something went wrong.