yakir8 / kosher_dart Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Lesser General Public License v2.1
License: GNU Lesser General Public License v2.1
Hi
why kosher_dart compute wrong value for January 01 2021 until December 31 2021?
16 teves compute twice on December 31 and January 01 and next days. (2020 is a Leap Year)
Thanks.
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! π
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```
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
Can you please add the tefillah rules from the recent KosherJava update?
because of this: (line 644) (\hebrewcalendar\hebrew_date_formatter.dart)
if (formatDate.contains("ss")) { formatDate = formatDate.replaceAll( "ss", DateFormat("ss").format(jewishDate.getGregorianCalendar())); }
Nevermind - I see you got that covered... good job BTW.
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());
}
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');
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?
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?
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());
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.
The API provides an option to add one month using the .forward()
method.
But how can I subtract one month?
Can you please add a formating for Shabbos mevarhim?
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?
Now only the Latin list is available.
That could help to build Hebrew month picker etc.
Thank you very much for this package.
Could you please add a suffix which points if the current week is a "Shoavavim"?
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
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.
Adding this to the original KosherJava package was a mistake:
kosher_dart/lib/src/zmanim_calendar.dart
Line 309 in 465e2cc
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.
dateRepository.jewishDate // JewishDate (19 Cheshvan 5783)
dateRepository.jewishDate.clone() // JewishDate (19 Kislev 5783)
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:
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
JewishCalendar jewishCalendar = JewishCalendar.fromDateTime("2022-05-01");
String parashaTitle =
_hebrewDateFormatter.formatWeeklyParsha(jewishCalendar);
Output: "Kdoshim".
Expected parashah: "Emor".
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
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?
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.
Could you please let meknow if I am missing anything.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.