From 06a10bcf912b4db28609f6675ce4cb197cd5d4c6 Mon Sep 17 00:00:00 2001 From: Daniel Cassidy Date: Sun, 29 Mar 2020 20:08:18 +0100 Subject: [PATCH] feat(todaylocal): add todayLocal function --- index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.ts b/index.ts index 64592ca..b626292 100644 --- a/index.ts +++ b/index.ts @@ -327,4 +327,9 @@ export function latestFn, U extends Readonly>(b: export function todayUtc(): Date { const today = new JsDate(); return {day: today.getUTCDate(), month: today.getUTCMonth() + 1, year: today.getUTCFullYear()}; +} + +export function todayLocal(): Date { + const today = new JsDate(); + return {day: today.getDate(), month: today.getMonth() + 1, year: today.getFullYear()}; } \ No newline at end of file