Enforce front project structure through ESLINT (#7863)
Fixes: https://github.com/twentyhq/twenty/issues/7329
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
export const computeNewExpirationDate = (
|
||||
expiresAt: string | null | undefined,
|
||||
createdAt: string,
|
||||
): string | null => {
|
||||
if (!expiresAt) {
|
||||
return null;
|
||||
}
|
||||
const days = DateTime.fromISO(expiresAt).diff(DateTime.fromISO(createdAt), [
|
||||
'days',
|
||||
]).days;
|
||||
return DateTime.utc().plus({ days }).toISO();
|
||||
};
|
||||
Reference in New Issue
Block a user