Skip to content

[datetime] Export TIMEZONE_ITEMS and MINIMAL_TIMEZONE_ITEMS #7477

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ggdouglas
Copy link
Contributor

Export TIMEZONE_ITEMS and MINIMAL_TIMEZONE_ITEMS lists to allow consumers to construct customized timezone selection components.

@@ -27,6 +27,7 @@ export { MonthAndYear } from "./common/monthAndYear";
export type { DayPickerProps } from "./common/reactDayPickerProps";
export type { TimePickerProps } from "./common/timePickerProps";
export { TimePrecision } from "./common/timePrecision";
export { TIMEZONE_ITEMS, MINIMAL_TIMEZONE_ITEMS } from "./common/timezoneItems";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think the names are crisp enough for an addition to the API? We could maybe consider condensing them to something like TIMEZONES and MINIMAL_TIMEZONES, maybe also TSDocs on the fields. What do you think?

@svc-palantir-github
Copy link

Export `TIMEZONE_ITEMS` and `MINIMAL_TIMEZONE_ITEMS` from datetime

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Base automatically changed from next to develop June 25, 2025 17:30
@changelog-app
Copy link

changelog-app bot commented Jun 25, 2025

Generate changelog in packages/datetime/changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

[datetime] Export TIMEZONE_ITEMS and MINIMAL_TIMEZONE_ITEMS

Check the box to generate changelog(s)

  • Generate changelog entry

@ggdouglas ggdouglas force-pushed the gdouglas/expose-timezone-items branch from 06248c6 to c8fa57a Compare June 25, 2025 21:19
@svc-palantir-github
Copy link

Export `TIMEZONE_ITEMS` and `MINIMAL_TIMEZONE_ITEMS` from datetime

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@benrucker
Copy link
Contributor

benrucker commented Jul 23, 2025

Think we could also export formatTimezone to go along with this? Tho would also have to export getTimezoneMetadata to get the input to formatTimezone.

Edit: thinking about this more, it could be nice to export a function that takes a IANA timezone string and a timezone format and outputs the nicely formatted string without needing to do the lookup to TimezoneWithNames beforehand.

Although, my team's needs on this have changed, so honestly we can just close this PR if wanted as it's not pressing for me anymore.

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

Successfully merging this pull request may close these issues.

3 participants