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

feat(ecowatt): Add day in box display #1687

Merged
merged 1 commit into from
Jan 20, 2023

Conversation

cicoub13
Copy link
Contributor

CleanShot 2023-01-13 at 22 19 38@2x

DayJS proposes only 3 formats for day:

  • d => day in number, not relevant
  • dd => day on two letters
  • ddd => day on three letters

With the available space, I thought that last format was the best

@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Base: 97.27% // Head: 97.27% // No change to project coverage 👍

Coverage data is based on head (a163d5f) compared to base (3d2ffc8).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1687   +/-   ##
=======================================
  Coverage   97.27%   97.27%           
=======================================
  Files         643      643           
  Lines        9686     9686           
=======================================
  Hits         9422     9422           
  Misses        264      264           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@Pierre-Gilles Pierre-Gilles left a comment

Choose a reason for hiding this comment

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

I'm good to merge, but I'm ok with this approach only because this integration is used in France only!

Creating custom dates format like that doesn't work with an international approach, because not all country put the day of the week first.

Just the english version of this is not strictly correct:

Screenshot 2023-01-16 at 10 08 28

Should be "Mon, January 16, 2023"

For future integration, what I recommend:

  • Either using official formats in dayjs
  • Or putting the format in the translation so it can be modified for each language

So ok for this one, but only because it's a FR-only integration!

@cicoub13
Copy link
Contributor Author

Totally agreeing, I took the fast path 😏
There is no Localized format with Day + Month + Year without Hour https://day.js.org/docs/en/display/format#localized-formats.
I would rework in another PR to "putting the format in the translation so it can be modified for each language"

@Pierre-Gilles
Copy link
Contributor

Yes, no worries for this PR, it's good enough like that!

@Pierre-Gilles Pierre-Gilles merged commit d5d81dd into GladysAssistant:master Jan 20, 2023
@relativeci
Copy link

relativeci bot commented Jan 20, 2023

Job #994: Bundle Size — 7.01MiB (~+0.01%).

d5d81dd(current) vs 707b252 master#993(baseline)

Metrics (1 change)
                 Current
Job #994
     Baseline
Job #993
Initial JS 3.03MiB 3.03MiB
Initial CSS 294.78KiB 294.78KiB
Cache Invalidation 59.06% 0%
Chunks 52 52
Assets 148 148
Modules 1258 1258
Duplicate Modules 2 2
Duplicate Code 0.03% 0.03%
Packages 111 111
Duplicate Packages 8 8
Total size by type (1 change)
                 Current
Job #994
     Baseline
Job #993
CSS 312.43KiB 312.43KiB
Fonts 93.55KiB 93.55KiB
HTML 13.58KiB 13.58KiB
IMG 1.64MiB 1.64MiB
JS 4.95MiB (~+0.01%) 4.95MiB
Media 0B 0B
Other 4.95KiB 4.95KiB

View job #994 reportView master branch activity

@cicoub13 cicoub13 deleted the fix-1665 branch May 23, 2023 09:01
@cicoub13 cicoub13 restored the fix-1665 branch May 23, 2023 09:01
@cicoub13 cicoub13 deleted the fix-1665 branch May 23, 2023 09:01
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.

None yet

2 participants