Skip to content

Instantly share code, notes, and snippets.

View madcampos's full-sized avatar
🔰
Eager to learn something new

Marco Campos madcampos

🔰
Eager to learn something new
View GitHub Profile
@madcampos
madcampos / date.extensions.ts
Last active September 5, 2022 21:17 — forked from weslleih/date.extensions.ts
Extend the TypeScript Date Object with some useful methods
/**
* Fork of: https://gist.github.com/weslleih/b6e7628416a052963349494747aed659
* Important notice: when using with node you need the package `full icu` installed and configured or compile node with full-icu support.
* This way the compiled js code can run using language data other then `en-us`.
*/
export {}
declare global {
interface Date {
addDays(days: number, useThis?: boolean): Date;