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

Date Conversion Issue #27

Open
rajSapkota26 opened this issue Apr 28, 2024 · 1 comment
Open

Date Conversion Issue #27

rajSapkota26 opened this issue Apr 28, 2024 · 1 comment

Comments

@rajSapkota26
Copy link

date not converted properly

here is sample code
final DateTime? picked = await showDatePicker(
context: context,
initialDate:DateTime.now(),
firstDate: DateTime(2010),
lastDate: DateTime(2100),
);

          final nep=  picked!.toNepaliDateTime();
          final d=  NepaliDateTime.now();

          log("date eng-----------  $picked");
          log("date nep from eng--- $picked --- $nep");
          log("date nep library------$d");
          log("date eng from nep-----${d.toDateTime()}");

-----------------------here is output-------------------------
[log] date eng----------- 2024-04-28 00:00:00.000
[log] date nep from eng--- 2024-04-28 00:00:00.000 --- 2081-01-17 00:00:00.000
[log] date nep library------2081-01-17 23:35:15.052654
[log] date eng from nep-----2024-04-29 23:35:15.052654

------------------issue--------------------
when 2024-04-28 convert it show 2081-01-17 , it should be 2081-01-16
when 2081-01-17 convert it show 2024-04-29, here it work fine in converter but todays date here 2081-01-16 why it give tomorrow date in NepaliDateTime.now();

@Bidhanrai
Copy link

Same issue for me

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