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

what do you think about functionality like this? #10

Merged
merged 1 commit into from
May 6, 2024
Merged

Conversation

EmVee381
Copy link
Contributor

@EmVee381 EmVee381 commented May 6, 2024

  • Updated date format selection functionality.
  • Added formatting function, including a parameter to support multiple types of formatting strings based on localization from i18n.
  • it allows format like these 'post.dateFormat': 'Do MMMM YYYY' and allow to define different formats for other parts of page.
  • Added Czech language primarily for testing purposes.
  • sorted en i18n object keys by alphabet

- Added formatting function, including a parameter to support multiple types of formatting strings based on localization from i18n.
- Added Czech language primarily for testing purposes.
Copy link

vercel bot commented May 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
astro-yi ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2024 11:29am

@cirry
Copy link
Owner

cirry commented May 6, 2024

Nice feature, but the date format should be configured in the config field in /src/consts.ts. Users are likely not to modify the i18n file, but will modify consts.ts to configure the theme. Can you modify it?
@EmVee381

@EmVee381
Copy link
Contributor Author

EmVee381 commented May 6, 2024

yes i understand you want to have everything configurable in consts.ts

then next we should solve dayjs locales as you see in i18n/cs first line import 'dayjs/locale/cs' we need find way how to make dynamic import based on "config.lang" attribute but "vite" don't support dynamic imports, i am not so skilled so far.

Ok i will move format string to const.ts but it should be in i18n file becase date format is heavily dependent on locales i know it, because i am eaastern european we write dates like d.m.yyyy americans writes m-d-yyyy british d/m/y and i am sure there is many others :)

i understand your request, but ithink it should be part of locales let me know.

@cirry
Copy link
Owner

cirry commented May 6, 2024

I understand what you mean, and the date format is also based on the region. I agree.

@cirry cirry merged commit 5b6c95b into cirry:main May 6, 2024
1 check passed
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