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

How can we add year value to show the year according to my country? #45

Open
SittiphanSittisak opened this issue May 22, 2022 · 6 comments

Comments

@SittiphanSittisak
Copy link

SittiphanSittisak commented May 22, 2022

My year is an additional 543 years from the year by A.D.
I already set the locale property to my country(TH).
I see the dateFormat property config this but can't add 543 years.

I can set the initialDate property by DateTime(DateTime.now().year + 543) but it is not correct. February have 28 days and 29 days every 4 years.
For the example:
A.D. 2020 => 29 days
in TH we add 543: 2563 => 29 days
if I use DateTime(DateTime.now().year + 543), it will wrong:
A.D. 2020 => 29 days
TH 2563 => 28 days //2564 => 29 days

My project saves date time with A.D. and shows with year + 543.
How to add years or shows the custom year?

I need it.

@SittiphanSittisak
Copy link
Author

SittiphanSittisak commented May 22, 2022

Now, I need to edit this
image
at C:\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_holo_date_picker-1.0.3\lib\date_time_formatter.dart

Can you add the property for this?
I need it.

@SittiphanSittisak
Copy link
Author

It will be better to add properties like:
yearDisplay: String Function(int)?
monthDisplay: String Function(int)?
dayDisplay: String Function(int)?

These will make this package can display data independently.

@kfiross
Copy link
Owner

kfiross commented Oct 24, 2022

@SittiphanSittisak I will change it to TH locale ONLY soon

@kfiross
Copy link
Owner

kfiross commented Oct 24, 2022

@SittiphanSittisak can you check the branch feature/BE?

@SittiphanSittisak
Copy link
Author

Sorry for replying late.
I checked this. This is correct.
Thank you very much.

@SittiphanSittisak
Copy link
Author

SittiphanSittisak commented May 4, 2023

@kfiross can you deploy this in production?

I saw f13f2b3
How do I use this version?

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

No branches or pull requests

2 participants