improve and extract nextDate() function; improve clickhouse-to-lmdbx sync script

This commit is contained in:
2024-08-02 16:41:42 -04:00
parent 85cafd985d
commit bf094de461
4 changed files with 192 additions and 31 deletions
+6
View File
@@ -0,0 +1,6 @@
export function nextDate(date: string) {
const [year, month, day] = date.split('-').map(Number);
const nextDay = new Date(Date.UTC(year, month - 1, day + 1));
const nextDateString = nextDay.toISOString().substring(0, 10);
return nextDateString;
}