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();
date not converted properly
here is sample code final DateTime? picked = await showDatePicker( context: context, initialDate:DateTime.now(), firstDate: DateTime(2010), lastDate: DateTime(2100), );
-----------------------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();