[upd] plankton

This commit is contained in:
fenris 2025-12-25 16:43:12 +01:00
parent 207ea459ae
commit 45f0135056
2 changed files with 27 additions and 12 deletions

View file

@ -1,11 +1,11 @@
/** /**
* @author fenris * @author fenris
*/ */
type int = number; declare type int = number;
/** /**
* @author fenris * @author fenris
*/ */
type float = number; declare type float = number;
declare class Buffer { declare class Buffer {
constructor(x: string, modifier?: string); constructor(x: string, modifier?: string);
toString(modifier?: string): string; toString(modifier?: string): string;
@ -19,7 +19,7 @@ declare namespace lib_plankton.base {
/** /**
* @author fenris * @author fenris
*/ */
type type_pseudopointer<type_value> = { declare type type_pseudopointer<type_value> = {
value: type_value; value: type_value;
}; };
/** /**
@ -2002,7 +2002,7 @@ declare namespace lib_plankton.storage.memory {
clear(): Promise<void>; clear(): Promise<void>;
write(key: any, value: any): Promise<boolean>; write(key: any, value: any): Promise<boolean>;
delete(key: any): Promise<void>; delete(key: any): Promise<void>;
read(key: any): Promise<Awaited<type_item>>; read(key: any): Promise<type_item>;
search(term: any): Promise<{ search(term: any): Promise<{
key: string; key: string;
preview: string; preview: string;
@ -3861,6 +3861,9 @@ declare namespace lib_plankton.pit {
function to_ywd(pit: type_pit, { "timezone_shift": option_timezone_shift, }?: { function to_ywd(pit: type_pit, { "timezone_shift": option_timezone_shift, }?: {
timezone_shift?: int; timezone_shift?: int;
}): type_ywd; }): type_ywd;
/**
*/
function number_of_weeks(year: int): int;
/** /**
* computes the point in time for switching to central european summer time * computes the point in time for switching to central european summer time
* *

View file

@ -2241,7 +2241,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
function verb(n) { return function (v) { return step([n, v]); }; } function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) { function step(op) {
if (f) throw new TypeError("Generator is already executing."); if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try { while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value]; if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) { switch (op[0]) {
@ -9970,12 +9970,6 @@ var lib_plankton;
* @author fenris * @author fenris
*/ */
class class_relation { class class_relation {
/**
* @author fenris
*/
check(value, reference) {
return this.predicate(value, reference);
}
/** /**
* @author fenris * @author fenris
*/ */
@ -9985,6 +9979,12 @@ var lib_plankton;
this.name = name; this.name = name;
this.predicate = predicate; this.predicate = predicate;
} }
/**
* @author fenris
*/
check(value, reference) {
return this.predicate(value, reference);
}
/** /**
* @author fenris * @author fenris
*/ */
@ -11654,6 +11654,17 @@ var lib_plankton;
]); ]);
} }
pit_1.to_ywd = to_ywd; pit_1.to_ywd = to_ywd;
/**
*/
function number_of_weeks(year) {
return lib_plankton.call.convey(year, [
x => from_ywd({ "year": (x + 1), "week": 1, "day": 6 }),
x => shift_week(x, -1),
to_ywd,
x => x.week,
]);
}
pit_1.number_of_weeks = number_of_weeks;
/** /**
* computes the point in time for switching to central european summer time * computes the point in time for switching to central european summer time
* *
@ -11740,7 +11751,8 @@ var lib_plankton;
"time": ((datetime.time === null) "time": ((datetime.time === null)
? ?
null null
: datetime_shifted.time) :
datetime_shifted.time)
}; };
} }
} }