Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: ♻️ refactor parameters timeZone & utcOffset #841

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Victor1890
Copy link

@Victor1890 Victor1890 commented Jan 23, 2024

Description

Refactor runtime check & typings of exclusive parameters timeZone & utcOffset and Add getTimeZoneAndOffset function to utils.ts

Related Issue

Closes #704

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • If my change introduces a breaking change, I have added a ! after the type/scope in the title (see the Conventional Commits standard).

refactor runtime check & typings of exclusive parameters timeZone & utcOffset and Add getTimeZoneAndOffset function to utils.ts
@sheerlox
Copy link
Collaborator

Hey @Victor1890, thank you for your contribution!

I'll take the time to review your PR as soon as I can, I'm under a bit of pressure right now.

@intcreator
Copy link
Collaborator

hey @Victor1890 I looked over the changes and I'm curious about the motivation for this change. it does factor out some code to a function, but that code is only used in one place and with the changes only five lines are reduced in the original context (four if you include the import that is required)

@sheerlox
Copy link
Collaborator

sheerlox commented Jan 22, 2025

I couldn't take the time to format a comprehensive response but I can complement your comment (which I agree with), the initial motivation for this was to refactor this huge block I (shamelessly) added to the codebase.

This is all discussed in #704 (comment), but I think this PR kinda misses the target, although I appreciate the effort and it's going in the right direction.

I tried giving it a look and started a review yesterday but realized the real implications got out of my head and would require a few hours of playing around, which I can't afford right now.

I hope the quick context intervention can help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor runtime check & typings of exclusive parameters timeZone & utcOffset
3 participants