Skip to content

Add support for time zones in DateTag. #131

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

Merged
merged 2 commits into from
Jul 9, 2024
Merged

Add support for time zones in DateTag. #131

merged 2 commits into from
Jul 9, 2024

Conversation

fpseverino
Copy link
Member

@fpseverino fpseverino commented Jul 1, 2024

These changes are now available in 1.11.0

Adds an additional parameter to DateTag that takes a time zone ID and uses it to set the timeZone property of the DateFormatter.

For example (as you can see in the added tests):

The date is #date(now, "yyyy-MM-dd'T'HH:mm", "America/New_York")

will be three hours ahead of:

The date is #date(now, "yyyy-MM-dd'T'HH:mm", "America/Los_Angeles")

@fpseverino fpseverino requested review from 0xTim and gwynne as code owners July 1, 2024 15:08
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 81.64%. Comparing base (f6a08a1) to head (fff9bec).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #131      +/-   ##
==========================================
- Coverage   82.09%   81.64%   -0.46%     
==========================================
  Files          25       25              
  Lines        2603     2517      -86     
==========================================
- Hits         2137     2055      -82     
+ Misses        466      462       -4     
Files Coverage Δ
Sources/LeafKit/LeafSyntax/LeafTag.swift 77.04% <71.42%> (-1.53%) ⬇️

... and 17 files with indirect coverage changes

Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

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

Thanks!

@0xTim 0xTim added the semver-minor Contains new APIs label Jul 9, 2024
@0xTim 0xTim merged commit c04e547 into vapor:main Jul 9, 2024
9 checks passed
@fpseverino fpseverino deleted the update-date-tag branch July 9, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor Contains new APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants