aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utils.ts')
-rw-r--r--src/Utils.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Utils.ts b/src/Utils.ts
index d1d400de7..38eb51529 100644
--- a/src/Utils.ts
+++ b/src/Utils.ts
@@ -399,6 +399,12 @@ export function timenow() {
return now.toLocaleDateString() + ' ' + h + ':' + m + ' ' + ampm;
}
+export function incrementTitleCopy(title: string) {
+ const numstr = title.match(/.*(\{([0-9]*)\})+/);
+ const copyNumStr = `{${1 + (numstr ? (+numstr[2]) : 0)}}`;
+ return (numstr ? title.replace(numstr[1], "") : title) + copyNumStr;
+}
+
export function formatTime(time: number) {
time = Math.round(time);
const hours = Math.floor(time / 60 / 60);