Skip to content

Commit

Permalink
feat(todaylocal): add todayLocal function
Browse files Browse the repository at this point in the history
  • Loading branch information
djcsdy committed Mar 29, 2020
1 parent bf8b51e commit 06a10bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,9 @@ export function latestFn<T extends Readonly<Date>, U extends Readonly<Date>>(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()};
}

0 comments on commit 06a10bc

Please sign in to comment.