Skip to content

Commit

Permalink
feat: jsr support
Browse files Browse the repository at this point in the history
  • Loading branch information
badosz0 committed Feb 29, 2024
1 parent 301b610 commit 3e40faa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions jsr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "@badosz/holy-time",
"version": "3.4.5",
"exports": "./src/index.ts"
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { TimeZone } from './constants';
export type { TimeZone } from './constants';
export { HolyTime as default } from './time';
export type { TimeResolvable, HumanUnit, IntervalUnit } from './types';
2 changes: 1 addition & 1 deletion src/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class HolyTime {
return date;
}

timeZone = TIMEZONE_MAP[timeZone] ?? timeZone;
timeZone = TIMEZONE_MAP[timeZone as keyof typeof TIMEZONE_MAP] ?? timeZone;

return new Date(date.toLocaleString('en-US', { timeZone }));
}
Expand Down

0 comments on commit 3e40faa

Please sign in to comment.