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

Add locale based date formatting #73

Conversation

rhanton
Copy link
Contributor

@rhanton rhanton commented Jul 17, 2020

Adding additional date handler for providing a locale ISO-3166-1 string if you need formatting that is locale-specific called formatLocaleDate.

Adding a helper specifically for that. Open to ideas on naming etc. I'm also not an amazing node/js developer, so if someone can check my code/tests, that would be excellent.

Fixes #72

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@598efda). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             master       #73   +/-   ##
==========================================
  Coverage          ?   100.00%           
==========================================
  Files             ?         8           
  Lines             ?       201           
  Branches          ?         0           
==========================================
  Hits              ?       201           
  Misses            ?         0           
  Partials          ?         0           
Impacted Files Coverage Δ
src/helpers/datetime.js 100.00% <100.00%> (ø)
src/helpers/math.js 100.00% <0.00%> (ø)
src/helpers/strings.js 100.00% <0.00%> (ø)
src/helpers/html.js 100.00% <0.00%> (ø)
src/helpers/conditionals.js 100.00% <0.00%> (ø)
src/H.js 100.00% <0.00%> (ø)
src/util/utils.js 100.00% <0.00%> (ø)
src/helpers/formatters.js 100.00% <0.00%> (ø)

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 598efda...aaf9a7b. Read the comment docs.

src/helpers/datetime.js Outdated Show resolved Hide resolved
@kabirbaidhya
Copy link
Contributor

@rhanton Thanks for the PR. Please do the above requested changes and we'll review again.

@rhanton
Copy link
Contributor Author

rhanton commented Jul 24, 2020

@kabirbaidhya & @mesaugat if you can look at this again, it would be much-appreciated. We're hoping it will be possible to get a build with this code in the next week so we can pull it into some internal libraries and make some development timelines that are coming up soon. Thanks for your help!

src/util/utils.js Outdated Show resolved Hide resolved
@kabirbaidhya
Copy link
Contributor

@rhanton Everything else looks good. Please do the requested changes and then we'll merge and do a patch. Thanks!

Copy link
Contributor

@kabirbaidhya kabirbaidhya left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for your contribution 👍 🎉

@kabirbaidhya kabirbaidhya merged commit 58c6427 into leapfrogtechnology:master Jul 28, 2020
@kabirbaidhya
Copy link
Contributor

@rhanton v1.0.18 released.

@kabirbaidhya kabirbaidhya changed the title Adding locale based date formatting helper Add locale based date formatting Jul 28, 2020
@rhanton
Copy link
Contributor Author

rhanton commented Jul 28, 2020

👏 Much thanks @kabirbaidhya ! I'm a Java developer by trade, so your input was incredibly helpful. Thanks for taking my team member Ryan Robinson's PR on "abs" a while back too.

@kabirbaidhya
Copy link
Contributor

@rhanton For sure; I'm glad it helped. Please feel free for any kind of contributions in the future.

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

Successfully merging this pull request may close these issues.

Unable to deal with locale-specific date formatting using moment.js
4 participants