Skip to content

Support timezone conversions in datetimeformat filter.#241

Merged
mattcoley merged 4 commits into
masterfrom
support-timezones
Oct 12, 2018
Merged

Support timezone conversions in datetimeformat filter.#241
mattcoley merged 4 commits into
masterfrom
support-timezones

Conversation

@mattcoley

Copy link
Copy Markdown
Collaborator

Addresses #239

Allows you to add an optional variable to the datetimeformat filter to specify which timezone the result should be converted to. For example, |datetimeformat("%B %d, %Y, at %I:%M %p", "America/New_York") will output the time in EST instead of UTC. If no timezone is given, it will default to UTC like before. If the timezone is not valid, it will throw an InvalidDateFormatException

@mattcoley mattcoley requested a review from boulter October 11, 2018 17:30
@codecov-io

codecov-io commented Oct 11, 2018

Copy link
Copy Markdown

Codecov Report

Merging #241 into master will increase coverage by 0.22%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #241      +/-   ##
============================================
+ Coverage     71.64%   71.86%   +0.22%     
- Complexity     1380     1387       +7     
============================================
  Files           219      219              
  Lines          4338     4358      +20     
  Branches        683      687       +4     
============================================
+ Hits           3108     3132      +24     
+ Misses          996      992       -4     
  Partials        234      234
Impacted Files Coverage Δ Complexity Δ
...ain/java/com/hubspot/jinjava/lib/fn/Functions.java 81.9% <100%> (+2.78%) 31 <6> (+3) ⬆️
...bspot/jinjava/lib/filter/DateTimeFormatFilter.java 100% <100%> (ø) 4 <0> (ø) ⬇️
...n/java/com/hubspot/jinjava/lib/tag/TagLibrary.java 82.35% <0%> (+0.53%) 8% <0%> (+3%) ⬆️
...ubspot/jinjava/objects/date/StrftimeFormatter.java 89.47% <0%> (+2.63%) 19% <0%> (ø) ⬇️
...njava/objects/date/InvalidDateFormatException.java 75% <0%> (+75%) 1% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 00919cb...dc28adb. Read the comment docs.

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.

2 participants