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

Bug: convertToHijriDate returns incorrect date range in syncfusion_flutter_core v27.2.5 #2195

Open
nidh13 opened this issue Dec 4, 2024 · 0 comments
Labels
calendar Calendar component core Common open Open

Comments

@nidh13
Copy link

nidh13 commented Dec 4, 2024

Bug description

The convertToHijriDate function in syncfusion_flutter_core v27.2.5 appears to be returning an incorrect date range when converting dates to the Hijri calendar. This results in inaccurate calculations and unexpected behavior.

Steps to reproduce

1-Import syncfusion_flutter_core.
2-Use the convertToHijriDate method with a specific Gregorian date (e.g., DateTime(2024, 12, 4)).
3-Observe the returned Hijri date.
4-Compare it with the expected Hijri date.

Code sample

Code sample
import 'package:syncfusion_flutter_core/core.dart';

void main() {
  DateTime gregorianDate = DateTime(2024, 12, 4);
  DateTime hijriDate = DateTimeHelper.convertToHijriDate(gregorianDate);
  print('Gregorian: $gregorianDate');
  print('Hijri: $hijriDate');
}

Screenshots or Video

Screenshots / Video demonstration

A screenshot or video is not required, as the issue is related to the invalid range value returned by the convertToHijriDate method.

Stack Traces

Stack Traces
No stack trace was generated. The app does not crash, but instead, it returns an invalid range value when calling the convertToHijriDate method.

On which target platforms have you observed this bug?

Android

Flutter Doctor output

[✓] Flutter (Channel stable, 3.22.1, on macOS 14.3.1 23D60 darwin-arm64, locale en-SA)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] Connected device (3 available)
! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

• No issues found!

@VijayakumarMariappan VijayakumarMariappan added calendar Calendar component core Common open Open labels Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
calendar Calendar component core Common open Open
Projects
None yet
Development

No branches or pull requests

2 participants