Code Monkey home page Code Monkey logo

kosher_dart's People

Contributors

danielsmith1239 avatar jorge-saieg avatar jsmeke avatar lcyper avatar mariovitor avatar moshe5745 avatar yakir8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kosher_dart's Issues

update readme

hey man this is awesome!

it toke me for ever to find your package and glad i didn't end up making my own because it wouldn't be close to as good your is!

but why not to upload to dart.pub so it would be easier for other to find. or at least add some examples to the readme.

anyway, would suggest to update the instructions in the "Getting Started" section,
" kosher_dart: git: url: https://github.com/yakir8/kosher_dart.git "
to a code block so you can see the indentation because it is important in .yaml files:

kosher_dart:
  git:
    url: https://github.com/yakir8/kosher_dart.git

and again, thanks for putting this package together! πŸŽ‰

Cant use in Dart 3 projects

The current Dart SDK version is 3.1.0.

Because kosher_dart >=2.0.3 depends on intl ^0.17.0 and kosher_dart <2.0.3 doesn't support null safety, every version of kosher_dart requires intl ^0.17.0.
So, because mekor_app depends on both intl ^0.18.1 and kosher_dart any, version solving failed.

The lower bound of "sdk: '>=2.1.0 <3.0.0'" must be 2.12.0 or higher to enable null safety.
For details, see https://dart.dev/null-safety```

new feature

I don't see anywhere in the documentation a way to format the date to be just the day and month without the year like you can do with the DateFormat in the intl package

this is a great package thanks

Format error "Nissan" to "Ni00an"

because of this: (line 644) (\hebrewcalendar\hebrew_date_formatter.dart)

if (formatDate.contains("ss")) { formatDate = formatDate.replaceAll( "ss", DateFormat("ss").format(jewishDate.getGregorianCalendar())); }

zmanim_calendar getMinchaGedola

BS"D thank you for translating this, but I am getting an error when trying to call getMinchaGedola.
In the original it checks if either startOfDay or endOfDay is null but the check should be that both are not null. Here is the updated code


 DateTime getMinchaGedola([DateTime startOfDay, DateTime endOfDay]) {

    if (startOfDay != null && endOfDay != null) {
      double shaahZmanis = getTemporalHour(startOfDay, endOfDay);
      return getTimeOffset(startOfDay, shaahZmanis * 6.5);
    } else
      return getMinchaGedola(getSeaLevelSunrise(), getSeaLevelSunset());
  }

Daily prayer times doesn't change with date

Hello,
I'm using the kosher_dart package in one of the flutter mobile app, where I intend to show the daily prayer time to users based on their geolocation. The anomaly that I witness is "events for day doesn't show changes based on user selection".

The code is pretty simple where I create a GeoLocation object (location) based on Latitude, Longitude, Elevation and current DateTime. There after I use the location object to create ComplexZmaninCalendar object to get different prayer time along with sunrise and sunset.

The sunrise,sunset and prayer times doesn't change even though the I move the selected date ahead by months. Ideally there should be delta changes in minutes by changing the months. I

//Create GeoLocation Object.
GeoLocation location = new GeoLocation();
location.setLatitude(latitude: 37.77);
location.setLongitude(longitude: -122.73);
location.setElevation(215);
location.setDateTime(_dateTime); // Current DateTime

//Calendar Object
ComplexZmanimCalendar zc =
new ComplexZmanimCalendar.intGeoLocation(location);

DateTime startOfDay = zc.getSunrise();
DateTime endOfDay = zc.getSunset();

print('SUNRISE: $startOfDay');
print('SUNSET : $endOfDay');

intl version workaround

When I add kosher_dart: ^2.0.2 to pubspec.yaml, 'flutter get' reports:

Because kosher_dart >=2.0.2 depends on intl ^0.17.0-nullsafety.2 and my_project_a depends on intl ^0.16.1, kosher_dart >=2.0.2 is forbidden.

If I then try to use the intl pre-release version with '^0.17.0-nullsafety.2' in pubspec, 'flutter get' reports:

Because every version of flutter_localizations from sdk depends on intl 0.16.1 and my_project_a depends on intl ^0.17.0-nullsafety.2, flutter_localizations from sdk is forbidden.

Any ideas on a workaround please?

The process of getting zmanim isn't very clear

This library defines a GeoLocation object but doesn't appear to have any process for constructing it based on location. When used with the location package, the coordinates I get back for longitude and latitude are correct, but when I provide them to an instance of GeoLocation, set the location using ZmanimCalendar, and get candle lighting time, the time I get back for my area is wrong.

What is the correct process for getting zmanim?

31 december is missing

hi,
your library is awesome! thank you very much
however, I noticed a critical bug!
the date: 31, December 2020 is missing! and all dates after it have one day late.
try this:

JewishDate date =JewishDate.initDate(jewishYear: 5781, jewishMonth: 10, jewishDayOfMonth: 16); 
// 16 in Tevet 5781  or 31/12/2020
print(date.getGregorianCalendar().toIso8601String()); 

this print: 2021-01-01T00:00:00.000 !! 31 is missing!!

equals and hashCode bug.

The JewishDate class has the equals method from the Java api! This does NOTHING in Dart!
You need to declare a:

bool operator == function.

Also, the hashCode method is commented out because of incompatible Java code, but you can simply return the hashcode of a unique int, like the once you use in the compare.

Any code that relies on equality will fail in many scenarios, since there is no operator == function. The Java equals() is ignored.

Package rework

Hello,
I’m in the process of completely reworking this package to take advantage of Dart-specific features and design standards. Do you think it would be wise to merge my branch into this package once it’s completed, or would it make more sense to keep my branch separate since there will be a lot of breaking changes?

Candle lighting times for second day of Yom Tov is wrong

Hi, the method getCandleLighting() on class ComplexZmanimCalendar returns the wrong time for candle lighting on second day of Yom Tov. Now it returns 18 minutes before SHKIA but it should return TZEIT HACOCHAVIM time, since candle lighting time for second day of Yom Tov is AFTER first day finishes.

Thank you!!
Tuvia

parasha name is not displayed correctly if it is israel

var jewishCalendar = JewishCalendar();
jewishCalendar.setInIsrael(true);

var hebrewDateFormatter = HebrewDateFormatter()..hebrewFormat = true;
var parasha = hebrewDateFormatter.formatWeeklyParsha(jewishCalendar);
print(parasha);

even if you change to FALSE it still shows the same.
jewishCalendar.setInIsrael(false);
there is currently a difference between israel and the rest of the world.

Bug !!!

Adding this to the original KosherJava package was a mistake:

DateTime? getCandleLighting() {

The original package does not account whether there is Candle Lighting on that day, or whether to calculate 18 min before sunset on Shabbos or after Tzais on 2nd day Yom Tov or 3-day Yom Tov.

You also don't account for second day Yom Tov outside of the US.
You only reference the possibility of a 2 day yom tov for JewishCalendar.ROSH_HASHANA.

Running the following code for the US on April 6th 2023 will crash even though there is candle lighting on that date.

ComplexZmanimCalendar zmanim = ComplexZmanimCalendar.intGeoLocation(geoLocation);
bool isThereCandleLighting = JewishCalendar.fromDateTime(z.getCalendar()).hasCandleLighting();
if (isThereCandleLighting){
    zmanim.getCandleLighting() // <<-- Will still return null !!!!!
}

The complexities of KosherJava are such that any port should try to copy it exactly.

clone method returns wrong date

dateRepository.jewishDate // JewishDate (19 Cheshvan 5783)

dateRepository.jewishDate.clone() // JewishDate (19 Kislev 5783)

Add null Safety.

Plugin project :kosher_dart not found. Please update settings.gradle.
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:

  • package:kosher_dart

For solutions, see https://dart.dev/go/unsound-null-safety

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 28s
Exception: Gradle task assembleDebug failed with exit code 1

Wrong parasha name

JewishCalendar jewishCalendar = JewishCalendar.fromDateTime("2022-05-01");
String parashaTitle =
    _hebrewDateFormatter.formatWeeklyParsha(jewishCalendar);

Output: "Kdoshim".
Expected parashah: "Emor".

Bug Fixme! Error on formatting the date

image

image

how to reproduce:

DateTime _currentDate = DateTime.now(); // 6/19/2022
final JewishCalendar jewishCalendar =
JewishCalendar.fromDateTime(_currentDate);
HebrewDateFormatter hebrewDateFormatter = HebrewDateFormatter();
String hebrewDate = hebrewDateFormatter.format(jewishCalendar);

the problem is when convert the date

formatDate = "20 Sivan 5782"

now "formatDate" have an "a" so it converts to "PM"
ending formatDate = "20 SivPMn 5782"

file: \kosher_dart-2.0.11\lib\src\hebrewcalendar\hebrew_date_formatter.dart

Package dependency problem

Hello,

I have built an application with your package some time ago and when I returned to it now , Pub Get is failing,
Flutter suggests that the problem is because of dependency on intl packge version 0.17, which is outdated (current version is 0.18.1)

Sine I am working with Flutter version >3.00 and with a Flutter Localization package that requires intl package version 0.18, the app cannot run.

Are there any intensions on your side to upgrade the Kosher_Dart package so it will support the latest version of intl?

Shabbos Entry and Exit Dates

Hello @yakir8

Regarding the Shabbos entry and exit times fetched by the Zmanim Calendar. The entry date is fetching a date that is after the exit date for Shabbos. And also the Shabbos entry date is fetched as Saturday, not Friday. Considering today's date 23-02-2022 the Shabbos entry and exit dates are,

Latitude - 17.6868159.
Longitude - 83.2184815.
Elevation - 54.0
Time Zone Offset - 5:30:00.000000
Current Date - 2022-02-23 13:58:29.072584.

Shabbos Start date 2022-02-27 17:41:46.000 // using the getShabbosStartTime() method.
Shabbos Exit date 2022-02-26 18:37:27.000 // using the getShabbosExitTime() method.
I have compared the Shabbos entry and exit dates with Chabad.org website.

Shabbos Issue.txt
shabbath issurs

Could you please let meknow if I am missing anything.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.