Skip to content

Commit

Permalink
preregister bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed Nov 15, 2023
1 parent 184e3da commit 5f021b5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,18 @@ export function persianMonthStringFarsi(value: Date) {
: null;
}

export function persianDay(value: Date) {
if (!value) {
return null;
}
return parseInt(
new Intl.DateTimeFormat('en-US-u-ca-persian', { day: 'numeric' }).format(
value,
),
);
}


export function persianMonth(value: Date) {
if (!value) {
return null;
Expand Down

0 comments on commit 5f021b5

Please sign in to comment.