15 lines
338 B
TypeScript
15 lines
338 B
TypeScript
import { DateTime, pipe } from "effect";
|
|
|
|
export const getTodayDate = (): string =>
|
|
new Date(Date.now()).toLocaleDateString("fr-FR", {
|
|
day: "numeric",
|
|
month: "long",
|
|
weekday: "long",
|
|
year: "numeric",
|
|
});
|
|
|
|
export const getCurrentYear = (): number =>
|
|
pipe(
|
|
DateTime.unsafeNow(),
|
|
DateTime.getPart("year"),
|
|
);
|