Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/components/primer/beta/relative_time.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class RelativeTime < Primer::Component
# @param month [Symbol] What format months should take. <%= one_of(Primer::Beta::RelativeTime::MONTH_OPTIONS) %>
# @param year [Symbol] What format years should take. <%= one_of(Primer::Beta::RelativeTime::YEAR_OPTIONS) %>
# @param time_zone_name [Symbol] What format the time zone should take. <%= one_of(Primer::Beta::RelativeTime::TIMEZONENAME_OPTIONS) %>
# @param time_zone [String] The IANA time zone identifier to use for formatting (e.g., "America/New_York").
# @param threshold [String] The threshold, in ISO-8601 'durations' format, at which relative time displays become absolute.
# @param precision [Symbol] The precision elapsed time should display. <%= one_of(Primer::Beta::RelativeTime::PRECISION_OPTIONS) %>
# @param format [Symbol] The format the display should take. <%= one_of(Primer::Beta::RelativeTime::FORMAT_OPTIONS) %>
Expand All @@ -116,6 +117,7 @@ def initialize(
month: MONTH_DEFAULT,
year: YEAR_DEFAULT,
time_zone_name: TIMEZONENAME_DEFAULT,
time_zone: nil,
threshold: nil,
precision: PRECISION_DEFAULT,
format: nil,
Expand All @@ -138,6 +140,7 @@ def initialize(
@system_arguments[:month] = fetch_or_fallback(MONTH_OPTIONS, month, MONTH_DEFAULT) if month.present?
@system_arguments[:year] = fetch_or_fallback(YEAR_OPTIONS, year, YEAR_DEFAULT) if year.present?
@system_arguments[:"time-zone-name"] = fetch_or_fallback(TIMEZONENAME_OPTIONS, time_zone_name, TIMEZONENAME_DEFAULT) if time_zone_name.present?
@system_arguments[:"time-zone"] = time_zone if time_zone.present?
@system_arguments[:threshold] = threshold if threshold.present?
@system_arguments[:precision] = precision if precision.present?
@system_arguments[:title] = title if title.present?
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@github/details-menu-element": "^1.0.12",
"@github/image-crop-element": "^5.0.0",
"@github/include-fragment-element": "^6.3.0",
"@github/relative-time-element": "^4.0.0",
"@github/relative-time-element": "^5.0.0",
"@github/remote-input-element": "^0.4.0",
"@github/tab-container-element": "^3.1.2",
"@oddbird/popover-polyfill": "^0.5.2",
Expand Down
6 changes: 6 additions & 0 deletions static/arguments.json
Original file line number Diff line number Diff line change
Expand Up @@ -5009,6 +5009,12 @@
"default": "`TIMEZONENAME_DEFAULT`",
"description": "What format the time zone should take. One of `nil`, `:long`, `:long_generic`, `:long_offset`, `:short`, `:short_generic`, or `:short_offset`."
},
{
"name": "time_zone",
"type": "String",
"default": "`nil`",
"description": "The IANA time zone identifier to use for formatting (e.g., \"America/New_York\")."
},
{
"name": "threshold",
"type": "String",
Expand Down
6 changes: 6 additions & 0 deletions static/info_arch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16716,6 +16716,12 @@
"default": "`TIMEZONENAME_DEFAULT`",
"description": "What format the time zone should take. One of `nil`, `:long`, `:long_generic`, `:long_offset`, `:short`, `:short_generic`, or `:short_offset`."
},
{
"name": "time_zone",
"type": "String",
"default": "`nil`",
"description": "The IANA time zone identifier to use for formatting (e.g., \"America/New_York\")."
},
{
"name": "threshold",
"type": "String",
Expand Down
Loading